Use the Close[0] for the last candle close price. That works for me.

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
Hi,
I am a new user for mql4 so I would like to know an information.
I'm creating a EA, and I would like to open a position at open price of a new candle only if the close price of the last close candle (of the frame that I use) is higher of the iMA of that candle....
So, if the program are executing on tick of the new candle (it is the open prize of the candle), how can I calculate the iMA of the last close candle?
If I have this istrction: iMA(NULL,0,MovingPeriod,MovingShift,MODE_SMA,PRICE_CLOSE,0);
The PRICE_CLOSE is the close price of the last complete candle or is the close price of the last tick of the current candle???
thanks in advance