It works fine on the first day except it just stops after hitting the first daily target and doesn't seem to be resetting each day.
I'm not sure what I'm missing here:
private int largestWIN = 0;
private int currDay = 0;
protected override void OnBarUpdate()
{
if(Time[0].Day != currDay)
largestWIN = 0;
if(Performance.AllTrades.Count > 0 && largestWIN == 0)
{Trade lastTrade = Performance.AllTrades[Performance.AllTrades.Count - 1];
if(lastTrade.ProfitPoints > 10)
{largestWIN = 1;
currDay = Time[0].Day;
}
}
if(largestWIN == 1)
return;
//entry stuff
}

Comment