stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

iClose, Is it the last bar or this.
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=929
Page 1 of 1
Author:  falsedave [ Sat Nov 03, 2012 9:14 pm ]
Post subject:  iClose, Is it the last bar or this.

I know this is probably gonna sound like a really stupid question but when using iClose to trigger a trade that is over an MA. Would it be shifted one ? as a shift of 0 would be this bar, which hasnt yet closed. But since iClose would then be useless with a shift of 0 has it not already been done for us by Empty4.

I hope this makes some sort of sense.
Author:  gaheitman [ Sat Nov 03, 2012 10:10 pm ]
Post subject:  Re: iClose, Is it the last bar or this.

falsedave wrote:I know this is probably gonna sound like a really stupid question but when using iClose to trigger a trade that is over an MA. Would it be shifted one ? as a shift of 0 would be this bar, which hasnt yet closed. But since iClose would then be useless with a shift of 0 has it not already been done for us by Empty4.

I hope this makes some sort of sense.
Using Close or iClose for bar 0 gives you the current price (or the price at the last tick). It's perfectly valid to use it, just don't think of it as the close. I've never tested it, but iClose(...,0) should be the same as MarketInfo(....,MODE_BID).

George
Author:  falsedave [ Tue Nov 06, 2012 6:53 pm ]
Post subject:  Re: iClose, Is it the last bar or this.

Ah ha. Gotcha.

Thankyou very much.
All times are UTC Page 1 of 1