Put a run's trades beside another engine's — MetaTrader's tester, another backtester, an earlier run — in one canonical form, hashed, and see whether they are the same list to the cent, or the first trade where they part.
Why compare
Two engines that disagree cannot both be right about one strategy on one recording. If you will run a strategy as an expert in MetaTrader, or you trust another backtester, setting its trades beside Bentrix's shows whether both engines read the rules, the fills and the costs alike. Where they differ, the first trade that differs is where to look.
01Doing it
In the run's Run window, open the Validation tab, then Against another engine: Compare with a trade list…, and choose the other engine's file. It can be:
- a JSON list of trades, each with its time (
time_msortime), its direction (longtrue or false, orside) and its net (net, orprofitwithcommissionandswap); - a Bentrix
run.json, an earlier run's record; - a CSV with a header naming those columns. A MetaTrader deals report's Direction column keeps only its out rows, the deals that closed a position.
02How they are compared
Both lists are put in one canonical form: one line a closed trade, its close time in milliseconds, L or S, and its net to two decimals, in the order the trades closed. Each list is hashed (sha256) over its lines.
- The same 214 trades, to the cent: the two engines made one list.
- They part at trade 37: ours …, theirs …: the first closed trade where the lists differ, with each side's line.
Times are compared as each list writes them. A list written on a broker's clock against a run on UTC parts at the first trade, so put both on one clock first. A Bentrix workbench takes its time zone when it is made (see the account).
03Bentrix against itself
The verification battery checks that a run repeated gives the same trade list's hash. That hash is the one to set against another engine's.
04From a program
run_parity with the run's address and the other list's text. See the SDK guide on testing honestly.