This is the code within OnOrderUpdate
if (order.Name == "StopExitLongFloor3b1" && orderState == OrderState.Filled || order.Name == "ExitProfitLongEntryFloor3b1" && orderState == OrderState.Filled || order.Name == "StopExitLongFloor3b1a" && orderState == OrderState.Filled || order.Name == "StopExitLongFloor3b1b" && orderState == OrderState.Filled ) { Floor3bActive = false; LongFloor3bEntry = null; LongFloor3bEntryActive = false; stopOrderLongEntryFloor3b1a = null; stopOrderLongBreakOutFloor3b = null; stopOrderLongEntryFloor3b1 = null; entryLongFloor3b1 = null; Floor3bLossCount += SystemPerformance.AllTrades[SystemPerformance.AllTrades.Count - 1].ProfitCurrency; }
I read here that there was a problem with the AllTrades.Count when apply the strategy from the strategy tab. I am doing the same. Does this issue still exist?
https://ninjatrader.com/support/foru...h-live-trading
Is there a better way to pull last trades profit/loss?
Thanks
Comment