For example:
datetimeinfo = Time[0].ToString();
if datetimeinfo == "5/27/2009 1:01:54PM"
{
if (myEntryOrder == null)
{
myEntryOrder = EnterLongLimit(1, true,1, Close[0] - (1 * Ticksize), "Long Entry");
barNumberofOrder = CurrentBar;
}
}
The problem is (looking at the completed trades of the backtest), it is entering my long trade DURING the ""5/27/2009 1:01:54PM" bar on the 3350. This is not what I want - I need to obtain the close value of the "5/27/2009 1:01:54PM" 3350 bar, and *then* enter my long limit order based on that, on the next 3350 bar. I assumed that it would first wait until the "5/27/2009 1:01:54PM" bar on the 3350 was closed, and then issue the long limit order at the beginning of the very next bar.
Any thoughts?
Thanks
Shawn
Comment