what's wong with iClose()? It does what its name says, it will return the close price of every closed candle.
What would your proposed "better" iClose() do? Would it tell me the close price before the candle has actually closed? This would indeed be a useful function. If you got it working please post it here. Knowing on Monday where the week will close on Friday would be very useful.
Based on this thread, here is the best EA ever :-)
if( iClose(Symbol(),PERIOD_D1, -1 )-Ask > 50*Point) OrderSend(Symbol(),OP_BUY,1.0, Ask,2, 0 /* no stop loss! we know Close[-1] */,Ask+50*Point,"",0,0,0);

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
Can anyone explain why iClose uses every tick instead of the last tick that arrived at then end of the time period ?
iClose should be renamed iCurrent and a new iClose function that uses the last tick to arrive, by 59.9999 seconds at the last minute of the charts time period should be called iClose.
I know I could write my own function to do this but it would be less confusing if the developers had done it properly in the first place.