Download MetaTrader 5
To add comments, please log in or register
Have you made a screenshot in MetaTrader? Share it with friends!
bmwarmani
5
bmwarmani 2016.06.26 20:28 

Hello,

If anyone have formula how to calculate exact price for next 2 MA crossover please post it.

I have 2 MAs, and wanted to know at what price next crossover will happen.

FastMAPrice = NormalizeDouble(iMA(NULL, 0, 10, 0, MODE_SMA, PRICE_CLOSE, 0), Digits);

SlowMAPrice = NormalizeDouble(iMA(NULL, 0, 20, 0, MODE_SMA, PRICE_CLOSE, 0), Digits);

whroeder1
13640
whroeder1 2016.06.27 01:16  

Do the math.

SMA10 = (x + Close[1] + ... + Close[9]) / 10

SMA20 = (x + Close[1] + ... + Close[19]) / 20

Cross is SMA10 == SMA20, solve for x. Good until the next bar.

/
To add comments, please log in or register