Page 1 of 1

Variable Spread on MT5

Posted: Thu Dec 16, 2021 1:34 pm
by danyz1982
Hi,
I'm new here :)
I can't seem to understand how to export TS data to MT5 with embedded spread information. The feature seems to be available on for MT4?
Moreover, I've purchased the professional package, how do I access TS support? Or is this forum the support? Thanks for letting me know!
Cheers,
Daniele

Re: Variable Spread on MT5

Posted: Thu Dec 16, 2021 10:33 pm
by tickstory
Hi Daniele,

Thanks for touching base and welcome aboard! You've come to the right place to ask any questions. As a subscriber, we will prioritize our responses to your support queries accordingly, so thanks for purchasing a license.

Regarding your question about MT5, please check out this article and video on how to back-test with Tickstory's tick data. If you have any additional questions, please let us know.

Cheers!

Re: Variable Spread on MT5

Posted: Tue Dec 21, 2021 10:07 am
by danyz1982
Hi there,
thanks for the quick answer :)
I had checked the post and video, but there's no mention about the spreads configuration, except for the following sentence:

"Using tick data means your back-tests will be much more accurate than using Metatrader’s standard 1-minute broker data. This is because you will be using real spreads rather than fixed spreads and real-time tick data so each individual price movement that occurred every minute will be passed into your Expert Advisor – just like in live trading!"

So, are the spreads embedded in the exported data? Or is there anything I need to configure within MT5? In the "new currency" settings I'm leaving the spread setting as "floating" but I'm not sure if this is enough?

Thanks for the help!
Cheers,
Daniele

Re: Variable Spread on MT5

Posted: Tue Dec 21, 2021 10:35 pm
by tickstory
Hi Daniele,

Yes, the MT5 Tester does support variable spread if you have imported tick data as described in the previous link. The tick data contains the actual bid/ask prices and MT5 will show this when "Every tick based on real ticks" modelling method is selected in the Strategy Tester. If you follow the exact steps in the document, there should be nothing else needed.

Please see the following code example how to use it. The code below will print the current spread in the top-left of the visual chart (the example was taken from the MT5 Help file under 'SymbolInfoDouble'):

Code: Select all

void OnTick() 
  { 
//--- obtain spread from the symbol properties 
   bool spreadfloat=SymbolInfoInteger(Symbol(),SYMBOL_SPREAD_FLOAT); 
   string comm=StringFormat("Spread %s = %I64d points\r\n", 
                            spreadfloat?"floating":"fixed", 
                            SymbolInfoInteger(Symbol(),SYMBOL_SPREAD)); 
//--- now let's calculate the spread by ourselves 
   double ask=SymbolInfoDouble(Symbol(),SYMBOL_ASK); 
   double bid=SymbolInfoDouble(Symbol(),SYMBOL_BID); 
   double spread=ask-bid; 
   int spread_points=(int)MathRound(spread/SymbolInfoDouble(Symbol(),SYMBOL_POINT)); 
   comm=comm+"Calculated spread = "+(string)spread_points+" points"; 
   Comment(comm); 
  }
Hope this helps.

Re: Variable Spread on MT5

Posted: Wed Dec 22, 2021 11:20 am
by danyz1982
Hi,
thank you so much for the detailed answer. Just to confirm, since I've seen written this somewhere else in the forum, I don't need to use the TS launcher to make use of the variable spread, right? I just need to follow the procedure outlined in the link, correct?
Cheers,
Daniele

Re: Variable Spread on MT5

Posted: Wed Dec 22, 2021 1:10 pm
by tickstory
That's correct, Daniele. The launcher is only necessary for MT4 because it does not support variable spread natively like MT5 does.