Hi All,
With help of this forum, slowly i m learning to code.
Now trying to find the time/date of LowestEMA or LowestPrice.
LowestEma is the lowest value of EMA and LowestPrice is the low price of the bar where LowestEMA happened.
But i have difficulties finding that bar to retrieve date/time through iBarShift and iTime and i think i m not using them correctly.
Thx for the help.
double LowestEMA = iMA(Symbol(), 0, 10, 0, MODE_EMA, PRICE_CLOSE,0); int LowestBar; datetime LowestTime; for (int i = 1; i < 30; i++) { double MovingAverage = iMA(Symbol(), 0, 10, 0, MODE_EMA, PRICE_CLOSE,i); { if(MovingAverage < LowestEMA) { LowestEMA = MovingAverage; LowestBar = i; LowestTime = iTime(NULL, PERIOD_H4, LowestBar); } } }
Thx William.
Got it!
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register