how to calculate distance bid ask from moving average...

 
I apologize to the moderator if the topic ever discussed before ...

does anyone know how to get distance bid ask from moving average ??? in this case, between current candlestick and 200 MA?...





Thanks for the explanation

Files:
EURUSDH1.png  21 kb
 

You just need to calculate the iMA(Symbol(), 0, ..., ..., ...  ) and the High[x] or Low[x] of the candle and find the difference.

Then, divide the result on the Point value (0.01, 0.001, 0.0001, or 0.00001) to get the geometrical distance otherwise you

don't need to divide it if you want to use it in your operations. It depends on the logic you are using in your code. 

Reason: