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.
iClose, Is it the last bar or this.
- gaheitman
- Trader
- Posts: 655
- Joined: Tue Nov 15, 2011 10:55 pm
- Location: Richmond, VA, US
Re: iClose, Is it the last bar or this.
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).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.
George
-
falsedave
- Trader
- Posts: 53
- Joined: Sun Aug 26, 2012 5:00 pm