Variable Spread on MT5

General discussion about the Tickstory Lite software package.
Post Reply
danyz1982
Posts: 7
Joined: Thu Dec 16, 2021 1:27 pm

Variable Spread on MT5

Post 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

tickstory
Posts: 4883
Joined: Sun Jan 06, 2013 12:27 am

Re: Variable Spread on MT5

Post 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!

danyz1982
Posts: 7
Joined: Thu Dec 16, 2021 1:27 pm

Re: Variable Spread on MT5

Post 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

tickstory
Posts: 4883
Joined: Sun Jan 06, 2013 12:27 am

Re: Variable Spread on MT5

Post 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.

danyz1982
Posts: 7
Joined: Thu Dec 16, 2021 1:27 pm

Re: Variable Spread on MT5

Post 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

tickstory
Posts: 4883
Joined: Sun Jan 06, 2013 12:27 am

Re: Variable Spread on MT5

Post by tickstory »

That's correct, Daniele. The launcher is only necessary for MT4 because it does not support variable spread natively like MT5 does.

Post Reply