My code returns SystemPerformance.AllTrades count as zero in one file and in another file it is working as expected. Both files have exact same code but the behaviour of AllTrades is different. I see TradeCount is increasing and cumprofit is also reflecting fine but when i try to retrieve last trade then it throws index out of range on the first file
if(SystemPerformance.AllTrades.TradesCount>0)
lastTrade = SystemPerformance.AllTrades[SystemPerformance.AllTrades.TradesCount - 1]; (works in one .cs file but not in other)
I'm lost, appreciate any help.
Comment