Backtesting Issue... - page 3

Alexandru Casian
430
Fernando Carreiro #:

You don't have to install a new MT5 for each account for back-testing or collecting tick data. Just log onto a different account and download the tick-data or run the back-tests. Each trade server's data is kept in a different directory.

Yep, that's how I did on the new MT5. But the old was (and still is) behaving in a weird way, it had no ICMarketsSC-MT5-2 folder even though it was connected to ICMarketsSC-MT5-2. Ticks also aren't saved there. That's why I installed a new MT5.
The "File->Open Data Folder" is finding the right folder (I know it because it contains the EA I started developing while connected to ICMarketsSC-MT5 (for which there folder exists). But there is no ICMarketsSC-MT5-2 folder. Weird things... but not so important.

Fernando Carreiro
9732
Alexandru Casian #: Yep, that's how I did on the new MT5. But the old was (and still is) behaving in a weird way, it had no ICMarketsSC-MT5-2 folder even though it was connected to ICMarketsSC-MT5-2. Ticks also aren't saved there. That's why I installed a new MT5. The "File->Open Data Folder" is finding the right folder (I know it because it contains the EA I started developing while connected to ICMarketsSC-MT5 (for which there folder exists). But there is no ICMarketsSC-MT5-2 folder. Weird things... but not so important.

Ok, understood! Also note, that the ticks and history data for the Strategy Tester are repeated again in the tester's subfolders. So you end up with double the space occupied by history and tick data.

EdFuk
132
EdFuk  
Thankyou for the responses and the recent interesting discussion. I have certainly learnt a lot from it. I too will check how much tick data there is using my two brokers (IC Markets and Darwinex). The UK100 bar data only goes back to 2017 on IC Markets. 

Even if there is tick data I look to trade on the close the 5 minute and above bars so I was looking to try to considerably reduce testing time by using 1 minute OHLC data. I’m guessing that using real ticks would considerably slow the testing down, especially any optimisation?

I have successfully downloaded 1 minute data from tickstory and imported into MT5. Everything looks OK for forex but the spread for the GBR.IDX (FTSE) is incorrect. It seems the data from Dukascopy is three digits rather than 1 that my broker uses. When I export with MT5 bar format the spread is converted to an integer and because of the # digit difference is a factor of 100 too high. Is there an easy solution to this or am I going to have to write my own conversion code?


Many thanks,


Ed

Fernando Carreiro
9732
EdFuk #: I have successfully downloaded 1 minute data from tickstory and imported into MT5. Everything looks OK for forex but the spread for the GBR.IDX (FTSE) is incorrect. It seems the data from Dukascopy is three digits rather than 1 that my broker uses. When I export with MT5 bar format the spread is converted to an integer and because of the # digit difference is a factor of 100 too high. Is there an easy solution to this or am I going to have to write my own conversion code?

The values exported from TickStory seem correct to me (I used default generic bar format export):

Date,Timestamp,Open,High,Low,Close,Volume
20220510,17:50:00,7270.692,7270.71,7265.174,7267.377,0.0982360008492833
20220510,17:51:00,7267.395,7274.707,7266.692,7274.189,0.125717001032172
20220510,17:52:00,7274.177,7275.201,7272.883,7274.707,0.0920540007864474
However, whatever the case, the output is CSV file, so you can process it in any advanced text editor or CSV application to change the decimal position. Or you can code your own tool to process it in MQL too.
EdFuk
132
EdFuk  
Fernando Carreiro #:

The values exported from TickStory seem correct to me (I used default generic bar format export):

However, whatever the case, the output is CSV file, so you can process it in any advanced text editor or CSV application to change the decimal position. Or you can code your own tool to process it in MQL too.

Hi Fernando,

I'm trying to import 1 minute bars using the MT5 facility:


I've selected the Metatrader 5 Bar Format (but included the header for display purposes here)


This gives the following output. As you can see the spread (last value) is in the thousands which must be because the data is 3 digits rather than 1 that I have.



I'm presuming that this will affect the entry and exit prices greatly?

Fernando Carreiro
9732
EdFuk #: This gives the following output. As you can see the spread (last value) is in the thousands which must be because the data is 3 digits rather than 1 that I have. I'm presuming that this will affect the entry and exit prices greatly?

Yes, it will, but it can easily be resolved without needing to change the CSV file.

When creating the Custom Symbol, you can just set the tick size and point size to "0.001" instead of "0.1". Then importing the data it will no longer pose a problem.

As long as your EA properly calculates things using the tick size and tick value, then there will be no problem with your EA using this data.

EDIT: Also, make sure your Tick Value is in accordance with the new Tick Size as well, in the Custom Symbol's specifications.

EdFuk
132
EdFuk  
Fernando Carreiro #:

Yes, it will, but it can easily be resolved without needing to change the CSV file.

When creating the Custom Symbol, you can just set the tick size and point size to "0.001" instead of "0.1". Then importing the data it will no longer pose a problem.

As long as your EA properly calculates things using the tick size and tick value, then there will be no problem with your EA using this data.

EDIT: Also, make sure your Tick Value is in accordance with the new Tick Size as well, in the Custom Symbol's specifications.

Thankyou for this. I was fiddling around with digits but had no luck.


So for completeness I should have:

digits = 3

tick value = 0.001

tick size = 0.01 x current tick size?


Many thanks,


Ed

Fernando Carreiro
9732
EdFuk #: Thankyou for this. I was fiddling around with digits but had no luck. So for completeness I should have: digits = 3, tick value = 0.001, tick size = 0.01 x current tick size?

Digits = 3

Tick Size = 0.001

Tick Value = £0.001 (when using GBP deposit currency). You will have to change this value for other deposit currencies.

EdFuk
132
EdFuk  
Fernando Carreiro #:

Digits = 3

Tick Size = 0.001

Tick Value = £0.001 (when using GBP deposit currency). You will have to change this value for other deposit currencies.

Thanks very much for the help. I will try it out tomorrow. 

Alexandru Casian
430
Fernando Carreiro #:

Ok, understood! Also note, that the ticks and history data for the Strategy Tester are repeated again in the tester's subfolders. So you end up with double the space occupied by history and tick data.

Hmm, didn't pay attention to it till now. Do you mean it downloads data into both <DataFolder>/bases/<ServerName>/ and <DataFolder>/Tester/ subfolders?
I tested it now and there are no ticks/history downloaded into <DataFolder>/Tester/ subfolders. MT5 writes for me ticks/history only in the <DataFolder>/bases/<ServerName>/ subfolders.