Merge pull request #7801 from initrv/patch-1

Fix 4ac update_total_profit
This commit is contained in:
Robert Caulk 2022-11-27 12:29:07 +01:00 committed by GitHub
commit 732757e087
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -73,8 +73,8 @@ class Base4ActionRLEnv(BaseEnvironment):
trade_type = "short" trade_type = "short"
self._last_trade_tick = self._current_tick self._last_trade_tick = self._current_tick
elif action == Actions.Exit.value: elif action == Actions.Exit.value:
self._position = Positions.Neutral
self._update_total_profit() self._update_total_profit()
self._position = Positions.Neutral
trade_type = "neutral" trade_type = "neutral"
self._last_trade_tick = None self._last_trade_tick = None
else: else: