**********************************
protected override void Initialize()
{
Add("FAZ", PeriodType.Minute, 1);
CalculateOnBarClose = true;
// Triggers the exit on close function 15 seconds prior to session end
ExitOnClose = true;
ExitOnCloseSeconds = 15;
}
protected override void OnBarUpdate()
{
if (Bars.SessionBreak)
{
short1 = false;
short2 = false;
}
if(BarsInProgress == 0 && !short1)
{
Print(Time[0].ToString() + "Entering FAS Short");
entryOrder1 = EnterShort(0, 100, "FAS Short");
Print(Time[0].ToString() + entryOrder1);
short1 = true;
}
if(BarsInProgress == 1 && !short2)
{
Print(Time[0].ToString() + "Entering FAZ Short") ;
entryOrder2 = EnterShort(1, 100, "FAZ Short");
Print(Time[0].ToString() + entryOrder2);
short2 = true;
}
}
}
}
**************************************
This is the out put -
9/11/2009 6:32:00 AM Entering FAS Short
9/11/2009 6:32:00 AM Order='NT-00000/Back101' Name='FAS Short' State=Working Instrument='FAS' Action=SellShort Limit price=0 Stop price=0 Quantity=100 Strategy='ShortBoth' Type=Market Tif=Gtc Oco='' Filled=0 Fill price=0 Token='dd581c614c594640be9564095f9fe9c1' Gtd='12/1/2099 12:00:00 AM'
9/11/2009 6:32:00 AM Entering FAZ Short
9/11/2009 6:32:00 AM
As you can see the 2nd order shows null....

Comment