Why we write every indicator out
Both platforms have built-in indicators: iRSI and iMA in MetaTrader 5, ta.rsi in TradingView. The generated code calls none of them. Every indicator is written out in the code you download, statement for statement like our reference library, so you can read how each value is computed.
The reason is simple. MetaQuotes does not document that its built-ins give the same values as its own example source files. A built-in cannot be checked line by line; code that is written out can be tested value by value, and the next sections show how.
We also checked the platforms themselves. 112 platform facts were checked against MetaQuotes' and TradingView's own sources (MetaQuotes' example indicators, the MQL5 reference and the Pine Script v6 reference): 100 are verified and 12 are marked as assumptions.
A strategy is built for one platform, chosen in Step 1. This page covers both generators: MQL5 for MetaTrader 5 and Pine Script v6 for TradingView.
How exactness is measured
For each indicator we compute test values twice: with our reference library, and with the generated code running on the platform. Then we compare the two.
- On MetaTrader 5, exact means bit for bit. Each value is compared as its 64-bit pattern, with no tolerance at all: not even the last bit may differ.
- On TradingView, exact means zero tolerance. The absolute tolerance is 0. The script writes its values to the Pine log, and the log is checked by its SHA-256 fingerprint against our TradingView simulator, so one changed character fails the check.
The test values come from the specification of each indicator and from a sweep over every value of every choice it offers, such as each type of moving average.
"Exact" here is about indicator values. It is not a claim about money results or whole backtests.
The numbers
The indicator results:
| Platform | Indicator test values | Result |
|---|---|---|
| MetaTrader 5 | 1,159 (142 from the specification, 963 from the sweep of every choice value, 54 clock values) | 1,159 of 1,159 exact, bit for bit |
| TradingView | 461, in 10 scripts | 461 of 461 exact, zero tolerance |
All 47 indicator types are covered on both platforms: 29 types in the first indicator set, 16 in the second, and the candle and swing patterns in the rule tests.
Clean compiles
Every Expert Advisor is compiled in MetaEditor, MetaQuotes' own compiler. All 29 golden Expert Advisors compile with 0 errors and 0 warnings, in the product build, which is the file you download. The golden strategies are our fixed test strategies; each one defines what the product must do.
TradingView has no command-line compiler, so each Pine script was checked by hand in the Pine Editor, in a private script that was never published. Each script we checked compiled with 0 problems. Because the checks were manual, there is no single total for all scripts, and we do not claim one.
Multi-timeframe strategies and warm-up
A strategy can read a higher timeframe, for example a daily average while it trades on H4. Before its first value, an indicator needs a run of past bars: its warm-up. The generated code warms up an indicator on a higher timeframe on that timeframe's own bars, not on the bars of the trading timeframe.
The checks, on the reference strategy R4 (MACD on H4 with a daily EMA 200) and the two-timeframe golden strategy V-03:
- MetaTrader 5: in R4 the daily EMA equals our reference library bit for bit on 2,546 of 2,546 H4 bars, and the signals equal our backtest engine's on 4,832 of 4,832 rows.
- Our TradingView simulator gives the engine's signals on R4 (4,832 rows) and on V-03 (3,500 rows), and the same trades on R4, 18 of 18.
- TradingView itself: the log fingerprint of V-03 equals the simulator's, byte for byte, on its first 1,500 bars.
What the platforms limit, found in the same runs:
- The MetaTrader 5 tester gives an Expert Advisor higher-timeframe history only from 1 January of the year before the test starts. R4 wanted 1,000 daily bars and got 303.
- On TradingView, a script that limits its loaded bars (
calc_bars_count) also limits its higher-timeframe bars. Only our test scripts set that limit: R4 gave 56 trades with it and 64 without it. The script you download sets no limit. - The product does not yet warn you when a warm-up is longer than the history a tester gives.
Recovery after a restart
A terminal restarts, a computer crashes, an Expert Advisor is removed from the chart and added again. The generated Expert Advisor recovers its state after each of these, with the same trades as a run without the restart. This was tested in the MetaTrader 5 tester.
How: we restarted, crashed or removed the Expert Advisor every 397, 401 or 1,191 ticks, then compared each run with a run without any restart.
- The trades were the same, in netting accounts and in hedging accounts (20 hedging runs).
- A strategy shared by two charts also gave the same result.
Not proven: the live tick-history call CopyTicksRange (the tester refuses it), two real charts, and a second terminal.
Product build and test build
Our tests run a test build: the same code plus inputs and logs that let our tools compare it with the reference. You never get that build. The file you download is the product build, and so are the code in the Tactix Studio preview and the example on our home page. One switch makes it from the same code by removing the test-only inputs and logs.
On the cases checked, the two builds behave the same:
| Platform | Golden strategy | Product build against test build |
|---|---|---|
| MetaTrader 5 | V-02 | 17 deals, identical |
| MetaTrader 5 | V-11 | 199 deals, identical |
| TradingView | V-11 | 169 trades, identical |
Generator version
The generator is at version 1.0.0, and every generated file names its version in its header, so you can always tell which generator wrote a file.
Not supported, not proven
- No MetaTrader 4. The builder generates MQL5 for MetaTrader 5 and Pine Script v6 for TradingView, nothing else.
- No live trading test. Every run on this page is a MetaTrader 5 tester run or a TradingView backtest. Nothing was tested with real money or on a live account.
- No live tick history. The tick-history call
CopyTicksRangecannot run in the tester, so it is not proven. - Whole backtests are not bit-exact. Bit for bit is about indicator values. Signals are equal on the cases above; trades are equal or differ for a named, listed cause.
The wider record, with the backtest engine against the MetaTrader 5 tester, is on How we test. To build a strategy yourself, open the demo.

