Live Price Monitor
The eyes of the engine. It trusts only what is finished.
A candle that is still forming can say one thing now and the opposite a second later. The monitor never reacts to it. It waits for the close, then it evaluates.
Wake on the close, not every second
No busy polling. The monitor sleeps to just after each minute boundary, opens its eyes once, acts, and sleeps again. Same entry timing, a fraction of the load.
One clean pass per close
On each closed candle it reads the shared candles, the confirmation and the broker clock, tends any open trade, then asks the signal engine. Then back to sleep.
# runs once, right after a close def on_candle_close(): candles = read_shared_candles() conf = read_confirmation() clock = read_broker_clock() manage_open_trade(clock) return signal_engine(candles, conf) sleep_to_next_close() # +1s
Awake only in session
A short warmup before the start, eyes open through the session, quiet the rest of the day.
Warmup
→
Session open
→
Watch every close
→
Session end · sleep