Signal Engine
A candle either earns a signal, or it doesn't.
On every closed candle the engine fires the same trigger the backtest used, then makes the signal pass a run of gates. Miss one gate, and nothing is born.
# one signal must clear every gate def signal_engine(candle, conf): s = strategy_trigger(candle) # same as backtest if s == 0: return 0 if not conf_agrees(s, conf): return 0 if not inside_window(candle): return 0 if news_blackout(candle): return 0 if position_open(): return 0 return s # signal is born
Five gates, one signal
The trigger opens the run. Four checks narrow it down. Fail any single gate and the candle passes in silence.
SIGNAL
Same trigger as the backtest
The rule that fires live is the exact rule that produced the theoretical trades. One code path, two worlds.
If the two lists ever diverge, the cause is the market or the fill, never a different rule.
A signal you can trust
Once every gate lines up, the signal exists, and it heads straight to execution.