The MindStrat Strategy Format — Backtest and Live, Identical by Design
Most algorithmic trading platforms run different code paths in simulation and execution. The result: a backtest you cannot trust, and a live deployment that surprises you. MindStrat runs one engine in both modes — and we verify the parity continuously across live execution.
What is the MindStrat Strategy Format?
The MindStrat Strategy Format (MSF) is a standardized Python architecture for trading strategies that runs identically in backtest and live execution. A strategy written in MSF is not a backtest script that needs to be re-implemented for production — it is a single module that the simulator and the live trader both consume, byte-for-byte the same.
MSF strategies are structured around three layers: signal logic (entry and exit conditions evaluated per bar), risk management (position sizing, stop-loss, trailing stops, gates), and execution hooks (the points where the engine transitions from a decision to an order). Every layer behaves the same in simulation and in live trading on Binance.
The format also defines an indicator system that handles the two fundamentally different categories of technical indicators correctly — convergent indicators (that depend only on a fixed window) and path-dependent indicators (that depend on the entire history since session start). Most retail platforms collapse this distinction and break path-dependent indicators in live trading. MindStrat does not.
What is backtest-to-live parity?
Backtest-to-live parity is the principle that the exact same code you backtest is the code that runs live — so a strategy behaves the same in simulation as it does in real trading. Because there is no separate live trader and no re-implementation, the trades you validate in the backtest are the trades the engine places on Binance: a 1:1 relationship between backtest and live, by design rather than by promise.
Most platforms lose parity because their backtester and their live trader are two different programs that drift apart over time. MindStrat keeps them as one: a single Python engine consumes the same MSF strategy in both modes, so what you see in the backtest is what you get in live.
Why backtest-to-live parity matters
The most common bug in retail algorithmic trading is invisible: strategies that look great in backtest fail in live because the execution engines are not the same code.
The hidden bug in retail algo trading
When the backtester and the live trader are different programs, the only way to discover the drift is to lose money in production. By the time you see it, the damage is done.
Path-dependent indicators that lie
Indicators like SuperTrend, ParabolicSAR, OBV and VWAP depend on the entire history since session start. Implemented on a sliding window, they reset state in live and produce different signals from the backtest.
External calls that break determinism
Strategies that call external APIs at runtime cannot be reproduced in a backtest — there is no historical record of what each API would have returned at every past timestamp. Live and backtest diverge by design.
"If your backtest and your live trader are different code, you don't have a backtest — you have a sales pitch."
How MindStrat achieves parity
Four architectural decisions, each closing one of the gaps that breaks parity in other platforms.
- 1
One engine, two modes
The same Python module that runs the backtest also runs the live trader. There is no separate execution path, no re-implementation in a different language, and no 'live-only' logic that bypasses the simulator. This eliminates the most common source of drift. Both modes run on dedicated cloud infrastructure for 24/7 execution — same code, same result.
- 2
Stateful execution preserved across ticks
Path-dependent indicators (SuperTrend, ParabolicSAR, OBV, VWAP, Ichimoku) accumulate their state continuously. In live trading, indicator state survives between ticks identically to how it accumulates over a backtest array. No sliding-window resets, no hidden recomputation.
- 3
Real-time data sync from the exchange
Reserved values like equity, consecutive losses, and open position state are read directly from Binance in live mode — never reconstructed from a replay. The strategy's risk gates evaluate against real exchange state, not a simulator approximation.
- 4
Continuous parity validation across live execution
Parity is measured per-strategy in live execution and compared against the corresponding backtest. Any measurable drift is treated as a bug and triggers an alert — not a 'feature'. Validation is continuous, not a one-time benchmark.
If you can describe it, you can build it
MSF doesn't impose a shape on your strategy. Use indicators — or don't. Trigger on price, on time, on a calendar, on a threshold, on a pattern you invented yesterday. Trade once a month, every Monday, every time funding flips, or every tick a condition holds. Whatever your edge looks like, the format accepts it.
If an indicator isn't in the native catalog, the AI generates a custom one for you. If the trigger you want isn't a standard technical signal, the AI writes the logic. There's no fixed menu — the only hard rules are no lookahead and no runtime external API calls (the math behind backtest-to-live parity, not arbitrary product limits).
The universe of strategies is infinite
The list above isn't a catalog — it's a sample to give you a sense of range. Your strategy can use no indicators at all, mix three custom ones the AI invents, fire only on Tuesdays at 14:00 UTC, scale into a position over a week, hedge with a secondary symbol, or any combination of the above. Describe it (or build it manually). Either way, the engine runs it the same in backtest and in live.
Native indicators, plus DIY for custom
MindStrat ships with a deep native catalog of properly-implemented indicators — split between the two categories that matter for parity. And if what you need isn't there, the AI generates it for you.
Convergent
Depend on a fixed window. Vectorized for speed.
- RSI
- MACD
- Bollinger Bands
- ATR
- EMA / SMA
- Stochastic
- CCI
- ADX
- MFI
- Williams %R
- Keltner Channels
- Aroon, Vortex, ROC, TSI…
Path-dependent
Depend on full history. Stateful in live and backtest.
- SuperTrend
- ParabolicSAR
- OBV
- VWAP (session)
- Ichimoku (full cloud)
- KAMA
- ChaikinOsc
- AccuDist
- ZigZag
- McGinleyDynamic
- ChandeKrollStop
- ForceIndex, KVO, EMV, SOBV
DIY · Custom-buildable
Anything not listed, built using MSF stateful execution.
- Heikin-Ashi (any flavor)
- Renko bricks
- Custom trailing logic
- Volatility-based regime detectors
- Session-anchored VWAP
- Custom oscillator combinations
Build any custom indicator using MindStrat's stateful execution pattern — it inherits the same by-design parity as the native catalog.
Built-in risk management
Six risk primitives, each enforced by the engine itself — not as a layer on top that can be silently bypassed in live execution.
Fixed take-profit / stop-loss
Defined as percentage from average cost. Fires intra-bar in both backtest and live — no blind window between bar open and close.
Dynamic trailing stop
Tracks the favorable extreme with configurable distance. Gap-fill aware. Adapts to OHLC dynamics on the same code path in both modes.
Consecutive-losses gate
Blocks new entries after N real losses in a row. Counter is synchronized from exchange fills in live — never replayed or approximated.
Drawdown gate
Blocks new entries when deploy-cumulative equity drops below threshold. Equity is read live from the exchange, not from a simulator.
Cooldown windows
Custom counters for bars-without-trade after a loss, after a drawdown event, or after any condition you define. Respected identically in both modes.
Directional filters
Use secondary datasets (different symbol or timeframe) to gate entries — only long when macro is bullish, only short when bearish. Look-ahead-free by construction.
On the roadmap
Honest about gaps. We ship when it's right, not when it's promised.
Limit orders, stop-limit, OCO, bracket orders
Order types beyond market entries — for tighter control on slippage and complex exit setups.
Multi-position simultaneous (pairs trading, spread, statarb)
Trade more than one position per strategy — pairs, spreads, hedged baskets coordinated as a single unit.
State persistence between container restarts
Strategy memory (counters, custom variables, equity history) survives restarts — your bot picks up exactly where it left off.
Sub-minute timeframes (1s / 5s / 10s)
Bars below the 1-minute mark for higher-frequency strategies that need finer granularity.
Portfolio-level allocation across strategies
Coordinate sizing and exposure across all your active strategies — one risk envelope for the whole portfolio.
Alt-data ingestion (news, sentiment, on-chain)
Feed your strategies with non-price signals — earnings calendars, sentiment scores, on-chain activity.
ML / online-learning models with persistent state
Strategies that adapt over time — keeping what they've learned across deploys, not retraining from scratch.
Order flow / footprint / market profile
Volume-by-price detail for strategies that read what's happening inside each bar, not just OHLC.
What MindStrat doesn't do — and why
Limits, stated honestly. Better to know now than to discover them after you sign up.
Excluded by parity math
Lookahead / repaint indicators
Anything that uses future bars (or repaints after the fact) breaks 1:1 parity. Backtest can see the future of the array; live cannot. It's math, not engineering.
Runtime external API calls
A strategy that fetches data from an external API at runtime cannot be reproduced in backtest — there is no historical record of what each API would have returned at every past timestamp.
Excluded by target market
HFT sub-100ms execution
Microsecond execution needs colocation and FIX protocols. Different infrastructure entirely. Not our target.
Multi-leg options strategies
Different asset class. Requires options chains, IV inputs, Greeks calculation, integration with options exchanges. Out of scope.
Greeks-based hedging (delta-neutral, gamma scalping)
Subset of options trading. Same out-of-scope reasoning.
- ∞
- Strategies you can build
- One engine
- Backtest & live
Related Features
AI Strategy Creator
Generate strategies in MSF format from natural language — every output runs with the same by-design parity.
Learn moreRobustness Testing
Validate statistical robustness with Monte Carlo and Walk-Forward analysis before deploying live capital.
Learn moreBinance Trading Bot
Deploy validated MSF strategies to Binance live execution — backtest = live, by design.
Learn more