diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-04-01 18:36:18 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-04-01 18:36:18 +0900 |
| commit | b23aef3a9947d4d3d8e87b595ecf547159df7289 (patch) | |
| tree | c5c99869d300c4a1ace118a2dc03c5dfa3218499 /services/backtester/src | |
| parent | 5cee0686e421b1f21484c23e413692616e9e2ffa (diff) | |
feat(shared): add conviction, stop_loss, take_profit to Signal model
Diffstat (limited to 'services/backtester/src')
| -rw-r--r-- | services/backtester/src/backtester/engine.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/services/backtester/src/backtester/engine.py b/services/backtester/src/backtester/engine.py index 8854b17..b03715d 100644 --- a/services/backtester/src/backtester/engine.py +++ b/services/backtester/src/backtester/engine.py @@ -90,7 +90,12 @@ class BacktestEngine: signal = self._strategy.on_candle(candle) if signal is not None: - simulator.execute(signal, timestamp=candle.open_time) + simulator.execute( + signal, + timestamp=candle.open_time, + stop_loss=signal.stop_loss, + take_profit=signal.take_profit, + ) # Calculate final balance including open positions valued at last candle close final_balance = simulator.balance |
