Unnecessary lines in Base4, and changes for box space, to fit better for our needs (#7324)
This commit is contained in:
parent
1a8e1362a1
commit
2493e0c8a5
@ -66,10 +66,6 @@ class Base4ActionRLEnv(BaseEnvironment):
|
|||||||
self._position = Positions.Neutral
|
self._position = Positions.Neutral
|
||||||
trade_type = "neutral"
|
trade_type = "neutral"
|
||||||
self._last_trade_tick = None
|
self._last_trade_tick = None
|
||||||
elif action == Actions.Exit.value:
|
|
||||||
self._position = Positions.Neutral
|
|
||||||
trade_type = "neutral"
|
|
||||||
self._last_trade_tick = None
|
|
||||||
else:
|
else:
|
||||||
print("case not defined")
|
print("case not defined")
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ class BaseEnvironment(gym.Env):
|
|||||||
self.shape = (window_size, self.signal_features.shape[1] + 3)
|
self.shape = (window_size, self.signal_features.shape[1] + 3)
|
||||||
self.set_action_space()
|
self.set_action_space()
|
||||||
self.observation_space = spaces.Box(
|
self.observation_space = spaces.Box(
|
||||||
low=-np.inf, high=np.inf, shape=self.shape, dtype=np.float32)
|
low=-1, high=1, shape=self.shape, dtype=np.float32)
|
||||||
|
|
||||||
# episode
|
# episode
|
||||||
self._start_tick: int = self.window_size
|
self._start_tick: int = self.window_size
|
||||||
|
Loading…
Reference in New Issue
Block a user