Can't seem to get that figured out. It works sometimes but not others and not sure why.
// at the first line of OnBarUpdate
if (Bars.FirstBarOfSession)
stopTrading = false;
// last line of OnBarUpdate
if (Position.GetProfitLoss(close,PerformanceUnit.Curr ency) < 0)
stopTrading = true;
// this is the last line of OnOrderUpdate
if (Position.GetProfitLoss(close,PerformanceUnit.Curr ency) < 0)
stopTrading = true;

Comment