Learn how to load historical market data into the cTrader trading platform to test your automated trading systems (ATS) over a longer timeframe to capture as many market conditions as possible. The data that is provided by your broker is loaded into the cTrader trading platform when you backtest your automated trading systems (ATS) with historical market data.
Before backtesting, you will have the option to choose a data source - Either one-minute trend bars from a broker server or one-minute trend bars from a CSV file on your local disk. If you choose to use a CSV file you will need to specify its location, after which cAlgo will analyze the file and adjust minimum and maximum available dates for backtesting.
The cTrader platform has a module for backtesting and to get started you first need to make sure you are looking at the automated trading screen, just click on the button shown in green on the left-hand side of the screen to open it.
Once you are in the Automate module of cTrader you need to select your cBot and make sure you have a cBot instance added, if you need help just follow the link below.
Now that you have a cBot instance, you need to select your symbol and trading parameters for the automated trading system, on the screen to the right at the top you will see 3 options as shown below, make sure you select the Backtesting tab.
Now you can add your symbol CSV market data file into the cTrader platform for a deeper backtest, to do this just click on the settings icon top left to open the backtest settings window. Then select the data you wish to use, in the case it is the m1 bars in CSV-file as shown in no. 2. Now the last step is to select the file on your machine by clicking on the folder icon as shown below in no. 3, a dialogue window will appear just navigate to where your CSV file is located on your machine and select it.
Also, select your Spread as a fixed value, just copy the current live value by clicking the green button, be careful, if the markets are closed this value can be incorrect and very high, just look it up on your broker's website instead.
How to Check If the Data Loaded Correctly?
To check if the CSV data has loaded into cTrader correctly you can look at the start and end dates as shown below and you should see the sliders at each end of the control, in the example below shows data from 11.11.2012 - 17.09.2014
The last step involves the actual backtest if you are unfamiliar with backtesting using cTrader just follow the instructions below.
The CSV Market Data File Format
In order to use trend bars from the file you will have a comma-separated CSV file with the following columns:
- Open Price
- High Price
- Low Price
- Close Price
How to Buy Historical Market Data
If you wish to purchase and download historical market data for the cTrader trading platform for any symbol then we can provide you with the data, if we do not have the data in our web store then just contact us and we will create it for you.