Skip to content
Get a license

Code translations · How we check them

How we verify every platform translation against the Python reference

Backtests are not live results. General information, not advice. The decision is always yours.

Every strategy we deliver is backtested in Python, and each of the 7 other platform versions is translated from that Python code. To check the translations, we ran 10 strategies on 6 platforms, each on the platform’s own data, and compared every trade with the Python version run on exactly the same bars.

Last run: 2026-11-28
13,785 of 13,790
platform trades matched to Python (99.96%)
6
platforms tested on their own data
100 of 100
strategies compile on every platform

Summary

  • Entries: on all 6 platforms the entry days matched the Python reference, trade for trade.
  • Prices: entry prices were identical wherever the platform uses the same bar prices (spread-free data); where a broker spread applies, they differ by that spread.
  • Net result: in most cases within 1% of Python. The larger gaps have known, explained causes, listed under “Why results differ”.
  • Compile check: every one of the 100 strategies also compiles and loads on each real platform.

Together these checks show that the platform versions follow the same rules as the Python code, bar for bar. They don’t show that a strategy will make money: these are backtests, not live results.

Why Python is the reference

Python is the original code of all 100 strategies, and every backtest we publish is run with it. One engine, one data set and one set of rules means every strategy is tested the same way.

How the Python engine works, in short:

  • Bar by bar: the rules read each bar after it closes. Orders placed on a bar’s close are filled at the next bar’s open, so the code never uses information it couldn’t have had at the time.
  • Stops and targets: checked against each bar’s high and low. When a stop and a target could both have been hit in the same daily bar, Python assumes the stop came first. That is the cautious choice: a backtest should not count a win it can’t prove.
  • Warm-up: indicators are built from the first bar of the data, and the rules start trading after a fixed warm-up (bar 260 for these strategies), so every platform starts from the same point.
  • Saved results: the trade list of every backtest is saved. The Python file we deliver reproduces those saved trade lists exactly, for all 100 strategies.

Because Python is the reference, the question for every other platform is simple: given the same bars, does it make the same trades as Python?

How the translations are made

The platform versions are not written by hand, one by one. A translator reads each strategy’s rules once and writes them out in 7 languages, using the same building blocks every time.

PlatformLanguage
MetaTrader 5MQL5
NinjaTrader 8C# (NinjaScript)
cTraderC# (cTrader Automate)
TradingViewPine Script v6
TradeStationEasyLanguage
MultiChartsPowerLanguage (EasyLanguage-compatible)
ProRealTimeProRealTime (ProBuilder): the original code. Our backtests run this exact code; all 100 files are checked byte for byte against the code that was backtested.

The rules that keep every version faithful:

  1. Same logic, bar for bar. Each version runs the rules once per closed bar and sends its orders for the next bar’s open, like Python.
  2. Same indicators. Indicators (moving averages, RSI, ATR and so on) are computed by our own code inside each file, the same way as in Python, instead of each platform’s built-in versions, which can differ in small ways.
  3. Same warm-up. Each file counts bars from the start of the chart and starts trading at the same bar as Python.
  4. No tuning. Settings are copied from the Python version. Nothing is optimised or adjusted per platform.
  5. A header on every file naming the Python reference it was translated from, with notes on the platform’s known differences.

Because all 100 strategies go through the same translator, an error in a building block would show up in many strategies at once. That is what makes a sample of 10 meaningful (see “Why 10 strategies cover all 100”).

Check 1: every file compiles on the real platform

All 100 strategies compile on all 6 platforms we tested, in each platform’s own editor or against its own libraries. A file that doesn’t compile can’t run, so this is the first gate.

PlatformStrategies passedHow it was checked
MetaTrader 5100 / 100Compiled in MetaEditor 64: 0 errors, 0 warnings
NinjaTrader 8100 / 100Compiled in NinjaTrader’s NinjaScript Editor; all classes in NinjaTrader.Custom.dll
cTrader100 / 100Compiled against cTrader’s own cAlgo.API; the 10 test strategies also built in cTrader 5.10
TradingView100 / 100Added to a chart in TradingView; 98 ran in full, 2 hit the Basic plan’s calculation-time limit
MultiCharts100 / 100Imported into MultiCharts 64 v17, compiled on import (“Build succeeded”)
TradeStation100 / 100Compiled in MultiCharts’ EasyLanguage-compatible editor (not in TradeStation itself)

Before any platform was involved, the logic itself was checked three ways for all 100 strategies:

  • Python parity: the delivered Python file reproduces the saved backtest trade list exactly (100 / 100).
  • Per-bar engine: the bar-by-bar structure used by every platform version, run in Python, gives the same trades as the reference (98 / 100; in the other 2, two trades each differ because of exact ties, see “Why results differ”).
  • C# logic run: the generated C# code, run on simulated prices, behaves like the reference (98 / 100; the other 2 differ only on prices rounded to 2 decimals, i.e. exact ties, and match fully on unrounded prices).

The same compile check covers the 14 indicators (98 / 98 files) and the 89 code snippets (623 / 623 files).

Check 2: trade by trade, on each platform’s own data

Compiling proves a file runs; it doesn’t prove it trades like Python. So we ran 10 strategies inside each platform’s own backtester, on that platform’s own market data, and compared every trade with Python run on the very same bars.

The steps, the same on every platform:

  1. Test copies. Each of the 10 strategy files got a small addition that writes out two things when the backtest ends: the bars the platform used, and its list of trades. The trading rules were not touched.
  2. Platform backtest. The test copies ran in the platform’s own backtester, on its own data, with commissions and slippage set to zero.
  3. Python on the same bars. The bars written out by the platform were fed into the Python reference, unchanged.
  4. Matching. A platform trade and a Python trade count as the same trade when they have the same direction (long or short) and the same entry day. For each match we compare the entry price, the exit day and the exit price.
  5. Net check. We add up the points won and lost on the matched trades on both sides and compare them.
Show detailsThe data and settings used
PlatformMarket and dataPeriodBacktest setting
TradingViewS&P 500 index, TradingView daily data1871–2026Default fills (bar prices)
NinjaTrader 8E-mini S&P 500 futures, NinjaTrader daily data2010–2026NinjaTrader backtest, daily bars
cTraderUS 500 CFD, Spotware demo daily data2015–20261-minute bars from the server
MultiChartsE-mini S&P 500 futures (@ES), dxFeed daily data2001–2026Classic backtesting, no Bar Magnifier
MetaTrader 5US500 CFD, Pepperstone demo daily data2023–2026 comparedStrategy Tester, “1 minute OHLC”
TradeStationSame code run in MultiCharts (see above)2001–2026As MultiCharts

The 10 strategies mix long-only and long-and-short rules, with exits by signal, by stop loss and by profit target, so the main order types in the 100 are all exercised.

Results per platform

Out of 13,790 platform trades, 13,785 have a Python trade with the same direction and entry day (99.96%). The 5 that don’t are explained under “Why results differ”.

Show detailsTrades matched to Python (matched / trades made by the platform)
StrategyTradingViewNinjaTradercTraderMultiChartsMT5
band-dip-anticipated-macd-cross721 / 721115 / 11573 / 73173 / 17522 / 22
connors-rsi2-ma9-dax1,399 / 1,399230 / 230151 / 151349 / 34951 / 51
gh-rsi-stoch-scalp-signaling844 / 84489 / 8958 / 58158 / 15819 / 19
gh-sma-cross-target-rajesharma639 / 640101 / 10163 / 63153 / 15319 / 19
mt5-ibs-rsi-cci-step-line-cross1,623 / 1,623280 / 280186 / 186429 / 42961 / 61
parabolic-sar-flip-delayed-exit595 / 595115 / 11577 / 77174 / 17426 / 26
pullback-and-dip-buying-long875 / 875132 / 13296 / 96180 / 18035 / 35
pump-avoiding-mean-reversion351 / 35169 / 6952 / 53131 / 13218 / 18
short-term-rsi-pullback-long-short1,153 / 1,153175 / 175127 / 127258 / 25847 / 47
sma-pullback-with-rsi-filter685 / 685122 / 12287 / 87164 / 16435 / 35

within 1%1–10%above 10%

Show detailsNet difference on matched trades (platform vs Python, in % of Python’s net points)
StrategyTradingViewNinjaTradercTraderMultiChartsMT5
band-dip-anticipated-macd-cross0.00%0.00%−0.02%0.00%−0.5%
connors-rsi2-ma9-dax0.00%0.00%−1.1%0.00%−2.8%
gh-rsi-stoch-scalp-signaling+742%same-bar stop/target+143%same-bar stop/target+140%same-bar stop/target+150%same-bar stop/target+109%same-bar stop/target
gh-sma-cross-target-rajesharma0.00%+0.01%+0.46%+0.05%−0.7%
mt5-ibs-rsi-cci-step-line-cross+2.8%+8.0%+390%same-bar stop/target−8.5%−6.5%
parabolic-sar-flip-delayed-exit0.00%0.00%0.00%0.00%−0.7%
pullback-and-dip-buying-long0.00%−0.38%−0.01%0.00%−0.4%
pump-avoiding-mean-reversion−0.06%−0.88%−6.9%−0.07%−0.2%
short-term-rsi-pullback-long-short+0.01%0.00%0.00%0.00%−1.4%
sma-pullback-with-rsi-filter−0.01%0.00%−0.03%−0.15%−0.6%

within 1%1–10%above 10%

Notes on reading the tables:

  • cTrader: the 1-point spread cTrader charges on each trade is added back before comparing, so the figures show the logic, not the cost.
  • MT5: the spread is left in (about 0.4–1 point per trade), which is why every MT5 figure is slightly negative. Only trades from April 2023 are compared (see “Limits”).
  • gh-rsi-stoch-scalp-signaling and mt5-ibs-rsi-cci-step-line-cross: the entries match everywhere; the large percentages come from the same-bar stop/target rule and a net close to zero (see next section).
  • No prices, bars or profit figures are published here, only counts and differences.

Why results differ

Every difference we found comes from how a platform simulates trading, not from the translated rules. The entries, which are decided by the rules alone, matched on every platform.

Show detailsThe causes, one by one
CauseWhat happensWhere we saw itEffect
Stop and target hit in the same barA daily bar shows the high and the low, not which came first. Python assumes the stop. TradingView and MultiCharts guess the order from the bar’s shape. cTrader and MT5 look at 1-minute data.Mostly gh-rsi-stoch-scalp-signaling and mt5-ibs-rsi-cci-step-line-cross, which use tight stops and targetsA few trades flip from loss to win or back. Large in %, because these two strategies’ net is close to zero
SpreadBroker platforms buy at the ask and sell at the bid. Python and the futures/index tests use bar prices.cTrader (1 point a trade), MT5 (0.4–1 point)Net slightly lower than Python; entry prices differ by the spread
Trade still open at the endPython closes an open trade on the last bar. MultiCharts lists only closed trades.MultiCharts, one trade in some strategiesOne trade more on the Python side
Warm-up at the startPlatforms load a different amount of history before the first bar the rules see, so the first indicator values can differ slightly.MultiCharts, first two months of 20023 unmatched trades at the very start, then identical
Rounding to tick sizeSome platforms round calculated stop and target prices to the market’s tick (0.25 for E-mini futures).MultiCharts, NinjaTraderExit prices differ by a fraction of a point
Gaps in minute dataMT5’s tester builds daily bars from 1-minute data. Where the broker’s minute history has gaps, days are missing and the rules see different bars.MT5 before 2023 (Pepperstone demo)Trades before 2023 don’t line up, so they are left out of the comparison
Bar datesSome brokers start the daily bar the evening before (22:00 or 23:00 UTC) and label it with that date.cTraderDates are mapped to the trading day before matching; no effect on results
Show detailsExact ties

Exact ties. One more cause sits below the table because it is so rare: a price exactly equal to an average, or two averages exactly equal. Computers add numbers with tiny rounding errors (around 0.000000000000001), and the size of that error depends on the order the numbers are added in. Python’s averages can land a hair above the true value, a platform’s a hair below, so a rule like “close above the average” can go one way in Python and the other way on the platform. We traced every remaining difference to this:

  • three-bar-pullback-trend-buyer: on 2 days the close equalled the 3-day average of highs exactly; Python exited, the platform structure held one more day.
  • sma-pullback-long-with-stop: on 1 day the close equalled the 10-day average exactly; Python entered, the platform structure didn’t.
  • two-period-rsi and sma-pullback-long-with-stop in C#: differences appear only when the simulated prices are rounded to 2 decimals (which creates ties). With unrounded prices, all 40 extra runs matched Python exactly.
  • TradingView, gh-sma-cross-target-rajesharma: in December 1943 the 5-day and 25-day averages were exactly equal, so the cross came one day later.

In true arithmetic a tie is not “above”, so on these days the platform version is the strictly correct one. Ties are rare on real prices with several decimals and more common on old data rounded to 2 decimals.

The 5 unmatched platform trades are all explained: 3 are the MultiCharts warm-up trades, 1 is an exact tie on TradingView (in December 1943 the 5-day and 25-day averages were exactly equal, so the cross came one day later), and 1 is the cTrader spread (its 5% stop sat 1 point higher, and that day’s low touched it but not Python’s).

What this means for you: on any platform, results differ most for strategies with tight stops and targets close together, and when costs are included. Use the platform’s finest setting for intrabar fills (1-minute data or Bar Magnifier) when your platform offers one; with it, the platform comes closest to how stops and targets really fill.

Why 10 strategies cover all 100

The 10-strategy test checks the translator, not just 10 files. All 100 strategies are built by the same translator from the same building blocks, so the checks stack up like this:

  1. The rules are right in Python. The Python file of each of the 100 strategies reproduces its saved backtest exactly.
  2. The translator keeps the rules. For 98 of the 100, the bar-by-bar structure the translator writes into every platform version gives exactly the same trades as Python on the same data; in the other 2, all but 2 trades match.
  3. Every file runs. All 100 compile and load on every platform tested.
  4. The platform behaves as expected. For 10 strategies, the real platform, on its own data, made the same entries as Python. These 10 exercise the same building blocks the other 90 use: indicators, entries, exits by signal, stops and targets, long and short.

An error in a shared building block (an indicator, the order handling, the warm-up) would break many strategies at once, and would show up in the 10. An error in one strategy’s own rules would show up in step 1 or 2, which cover all 100.

What steps 1–4 can’t rule out is a platform quirk that affects only a strategy type absent from the 10. That is why we state the coverage openly below.

Limits

These are the limits of what has been verified so far:

  • 10 of 100 strategies were compared trade by trade on the platforms. The other 90 are covered by the compile check and the per-bar check, not by a platform trade comparison.
  • Indicators and code snippets are checked to compile on every platform, not compared value by value with Python on the platforms.
  • TradeStation code was run in MultiCharts, which reads the same language, not in TradeStation’s own backtester (that needs a TradeStation brokerage account).
  • MT5 trades line up only from April 2023, because of gaps in the broker’s minute history before that.
  • One market. All comparisons used the S&P 500 (index, futures or CFD) on daily bars. Other markets and intraday bar sizes were not trade-checked.
  • Costs set to zero in the comparisons, except the spread built into cTrader and MT5 prices.
  • Exact ties between a price and an average can still flip a single trade between Python and a platform (see “Why results differ”). On real market data we found 5 such trades in all the checks together.
  • Backtests only. Live trading adds slippage, partial fills, outages and broker rules that no backtest shows.

The date at the top of this page is the date of the last run.

Evidence pack and how to repeat the tests

The evidence pack holds every result on this page as plain tables you can open in any spreadsheet. It contains counts, pass/fail results and differences in %, but no prices, bars or profit figures, because the market data is licensed.

Download the evidence pack (.zip)10 KB. Plain tables that open in any spreadsheet.

Show detailsThe files in the pack
FileWhat it shows
check0_logic.tsvThe 3 logic checks for each of the 100 strategies, with notes on the small differences
check1_compile.tsvCompile result for each strategy on each of the 6 platforms (600 rows)
check2_settings.tsvMarket, data, period and backtest settings per platform
check2_<platform>.tsvTrade comparison per platform: trades on each side, entries matched, same exit day, net difference

To repeat a comparison yourself on any platform:

  1. Load the strategy file on the platform and run a backtest on daily bars, commission and slippage at zero.
  2. Export the platform’s list of trades and the bars it used.
  3. Run the Python version of the same strategy on those bars.
  4. Match the trades on direction and entry day, then compare entry price, exit day and exit price.

Expect the same entries. Expect exits to differ only where a stop and a target fall in the same bar, and net to differ by the costs your platform applies.

Backtests are not live results. General information, not advice. The decision is always yours.