From 646e53a4a49c69ba8adb82548411d552f12884cd Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sat, 11 Oct 2025 19:27:07 +0200 Subject: [PATCH] fix(reforcexy): tensboard plot after force actions removal MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- ReforceXY/user_data/freqaimodels/ReforceXY.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/ReforceXY/user_data/freqaimodels/ReforceXY.py b/ReforceXY/user_data/freqaimodels/ReforceXY.py index fb855da..2bfecf1 100644 --- a/ReforceXY/user_data/freqaimodels/ReforceXY.py +++ b/ReforceXY/user_data/freqaimodels/ReforceXY.py @@ -1766,8 +1766,8 @@ class MyRLEnv(Base5ActionRLEnv): def is_terminated(self) -> bool: return ( self._current_tick == self._end_tick - or self._total_profit <= self.max_drawdown - or self._total_unrealized_profit <= self.max_drawdown + or self._total_profit < self.max_drawdown + or self._total_unrealized_profit < self.max_drawdown ) def is_truncated(self) -> bool: @@ -2012,9 +2012,6 @@ class MyRLEnv(Base5ActionRLEnv): ("short_enter", "v", "firebrick", 5, 0.1, "Short enter"), ("long_exit", ".", "cornflowerblue", 4, 0.1, "Long exit"), ("short_exit", ".", "thistle", 4, -0.1, "Short exit"), - ("take_profit", "*", "lime", 8, 0.1, "Take profit"), - ("stop_loss", "x", "red", 8, -0.1, "Stop loss"), - ("timeout", "1", "yellow", 8, 0.0, "Timeout"), ] legend_scale_factor = 1.5 @@ -2073,8 +2070,6 @@ class MyRLEnv(Base5ActionRLEnv): ): axs[1].legend(loc="upper left", fontsize=8) axs[1].axhline(y=0, label="0", alpha=0.33, color="gray") - axs[1].axhline(y=self.take_profit, label="tp", alpha=0.33, color="green") - axs[1].axhline(y=self.stop_loss, label="sl", alpha=0.33, color="red") axs[2].set_ylabel("reward") reward_series = history.get("reward") -- 2.43.0