When a strategy is added to the Control Center Strategy Tab - it does not work. I always get 0.
Attached is some sample code that takes a LONG trade at 10:00am candle and should reverse.
This is a finding I found out of re-testing this stuff: http://ninjatrader.com/support/forum...d.php?p=437119
protected override void OnPositionUpdate(Position position, double averagePrice, int quantity, MarketPosition marketPosition ) { ... Trade lastTrade = SystemPerformance.AllTrades[SystemPerformance.AllTrades.Count - 1]; //Trade firstTrade = Performance.AllTrades.LosingTrades[0]; Print ( "OnPositionUpdate A LastTrade was "+ lastTrade.ProfitPoints );
Comment