Spreads

Greetings,

I am writing a EA based on high volatility periods on the M1 candle. There is a stats significant correlation with the Volatility +ve, Volume -ve and spreads and I would like to model likely spreads with my broker in a given future interval based on those variables.

I do have Tick data for 99 percent model quality but I can’t find how to track the Tick by Tick spreads with mql4 to find predictive relationships.

Please can u help

Mt4 and mt5 only store the ‘sell’ price. Therefore you won’t have any record of the spread unfortunately. It’s likely you’d have to purchase both bid and ask data, the difference between the two obviously being the spread you’re after.

If this is the problem you have, then you can download a script to record future spreads tick by tick - but this will only work when forward testing, not when looking back historically from the time you implement the script.

I suppose one issue that you ‘would’ have is that orders may not get executed at the price you are targeting when the spreads are volatile. This leaves you with slippage, how much would such an occurrence diminish the edge which you potentially have/want.