my Initialize() looks as follows
protected override void Initialize()
{
Add("ES 06-10", PeriodType.Minute, 1);
Add("YM 06-10", PeriodType.Minute, 1);
Add("NQ 06-10", PeriodType.Minute, 1);
SetTrailStop("", CalculationMode.Ticks, 57, false);
SetProfitTarget("", CalculationMode.Ticks, 71);
BarsRequired = 1;
ExitOnClose = true;
ExitOnCloseSeconds = 30;
TimeInForce = Cbi.TimeInForce.Day;
CalculateOnBarClose = true;
}
However in my OnBarUpdate()
protected override void OnBarUpdate()
{
if(Bars.FirstBarOfSession){
TradesPerDay = 0;
}
if (BarsInProgress == 0){
..............
}
else if (BarsInProgress == 1){
Print("THIS IS NEVER HIT");
..............
}
...........................
}

Comment