LuxAlgo
LuxAlgo reproduces the LuxAlgo Supertrend entry (from TradingView Pine v5) as a standalone Python service, and submits the resulting trades to MT5 Trader.
What it does
- Polls a market-data endpoint for 1-minute OHLC candles (one or more
quotes fromSYMBOLS_FILE, or a singleQUOTEin legacy mode). - Aggregates those 1M candles into a configurable target timeframe
(
TARGET_TF_MINUTES, e.g. 3 minutes), treating the still-forming target candle as a live bar. - Recomputes the Supertrend entry on every poll, so a signal can fire mid-candle (e.g. on minute 2 of a 3-minute candle) — matching how Pine evaluates the realtime bar.
- Submits each entry to mt5-trader (
POST /v1/signals,X-API-Key) as a market order with a stop-loss and take-profit.
1M candles ──▶ aggregate to TARGET_TF ──▶ Supertrend + SMA9
│
confluence overlays (gate)
│
fire once, lock bucket
│
POST /v1/signals (source=lux_algo)Mid-candle signals can repaint before the bar closes. LuxAlgo emits the first signal seen for a bucket and then locks that bucket — at most one entry per target candle. See Signal Logic.
Explore the docs
Install, configure .env, and run lux-algo against a paired mt5-trader instance.
Supertrend + SMA crossover, mid-candle fire-once-lock, and deterministic signal_id UUIDv5.
Signal LogicPIP_SIZE, distance vs absolute SL/TP, and calibration for gold and other instruments.
Hard TargetsOverlay agreement gate, CONFLUENCE_MODE, and counter-trend vetoes.
ConfluenceSYMBOLS_FILE multi-instrument manifests and forex/deriv pairing with mt5-trader.
ProfilesDATA_LOOKBACK, bucket alignment, and chart vs MT5 divergence.
Warmup & AlignmentFull environment variable reference from the README.
ConfigurationWhat the pytest suite covers — indicators, overlays, lock, confluence, and payload shape.
Tests