Topic: Increase Mt5 testing speed

Hi,
I need to test strategy with dynamic spread. I want to test M1 strategy, which enters and exit around midnight, when spreads skyrockets, so results with FSB is unbelievable too optimistic.  I love fsb but it can not do that... so I am planning to use mt5 for this. BUT now it is so slow with fsb exported EAs. Passed more than 2 hours and still it only tested 4 months. And I need to test/and optimize on multi-pair with years of data, so probably it will not be done in this decade big_smile

Is there any way how to improve that speed with exported FSB EAs? Or I need to write this strategy in mql5 from a scratch?

Re: Increase Mt5 testing speed

Or maybe there is a chance to implement dynamic spread? Had conversation by email with mr footon and he suggested that it can be done. We would need to import bid/ask data from broker and calculate bar spread.

After this backtest quality of 99.9% would have real meaning.

Re: Increase Mt5 testing speed

One suggestion may be to define the period of high spreads and avoid trading in that time.

I think you are testing on MT5, why can you not backtest on FSBPro..... which is almost instant.

Writing MT5 will give you a different approach than FSBPro, the data is interpreted differently. that is why it is faster.

Are you sure you need years and years of data.....?

My 'secret' goal is to push EA Studio until I can net 3000 pips per day....

Re: Increase Mt5 testing speed

I tried to avoid big spread time, works partially well. But problem is with fixed take profit, it can not be filtered if used, and this strategy requires small one. Also the problem is that strategy results curves around that unrealistic price action caused by bigger spread not the real market.

Example of the problem and impact for large trade sample:

https://image.prntscr.com/image/C9gIxRFBQJSP6r3gjgm2fg.png

https://image.prntscr.com/image/kfL1pR2RQmGWdjB9SMbxrg.png

And about data, more the better. Planning to use at least 3-4 years for optimization and one year for unseen check. Multiply it with other pairs data and you will have long period ... I always try to have at least 50 trades per variable for meaningful backtest, also I always check with unseen data period to see if it pass.

Another thing what does not go away from my worried mind is how much impact this overnight spread has in all portfolio level. I have lots of strategies based on day opening. Will need to check it someday same way like in example above.

Re: Increase Mt5 testing speed

Many years ago I looked for low spread brokers to try to make more money, finally I went to a fixed spread shop as I could not be bothered with the spread games.

I see the difficulty you are experiencing, I do not have a solution.

My 'secret' goal is to push EA Studio until I can net 3000 pips per day....

Re: Increase Mt5 testing speed

Some update for future searchers, who will wonder how to make mt4/5 backtest faster with FSB EAs. smile
My strategy trades only 3 hours in a day, and all other candles was not necessary except when needed to use exit strategy. For different strategies probably there is no way. I added in OnTick() before fsb code more checks, to check my trade-able hour and if there is already open trade, then execute all FSB EA code. If not, then skip it. So it made me about 7-8x faster.

void OnTick()
  {
   int x = TimeHour(TimeCurrent());
   if( x<MyHour && PositionsTotal()==0 ) {  return; } else 
   {
        ....   FSB code...
   }

Also there is comparison about my spoken overnight spread with mt5 and FSB on GBPAUD. Same data, same spread, same strategy, same settings. With lower spread pairs impact is lower.

https://image.prntscr.com/image/3DVqaR7qSvqERiMsaP46HA.png

Re: Increase Mt5 testing speed

Blaiserboy wrote:

Many years ago I looked for low spread brokers to try to make more money, finally I went to a fixed spread shop as I could not be bothered with the spread games.

I see the difficulty you are experiencing, I do not have a solution.

Not seen any broker who does not make bigger spreads about midnight. What are you using may I ask? smile

Re: Increase Mt5 testing speed

InstaForex is fixed spread

My 'secret' goal is to push EA Studio until I can net 3000 pips per day....