November 27, 2014
When comparing the output of back-tests obtained from different working machines, it is necessary to make sure that all aspects of our testing are identical, including:
- the database
- the formula used for testing
- the settings
In order to synchronize data – the best is to copy the entire local database folder. Using just the same data source, especially if it is real-time feed may not be enough due to different array lengths or some corrections that may have been applied in historical data on data-vendors server in between.
In case of any differences in results between two computers that is the very fist thing to check, as different input would result in different output.
To find out that the data are different you may simply create a checksum of data columns, using code like shown below:
Filter = Status("lastbarinrange");
AddColumn( Cum( High + Low + Close + Open ), "Price checksum");
AddColumn( Cum( Volume ), "Volume checksum" );
AddColumn( BarIndex(), "Number of bars");
AddSummaryRows( 1 ); // add total sum of columns
By running this code on both computers you can compare checksums to see if they are the same.
In order to transfer the formula and settings to the other machine it is enough to:
- select Analysis window
- use File->Save from the main menu and save the APX file
- open the same APX file on the other computer
If data, code and settings are identical, then the obtained results will also stay in sync.