We then go to OnOrderUpdate() and SetProfitTarget which is
if (orderState == OrderState.Filled && Position.MarketPosition == MarketPosition.Long) { averagePriceLong = Position.AveragePrice > 0 ? Position.AveragePrice : averageFillPrice; takeProfitLong = (averagePriceLong) //////+ (some hidden calculations); SetProfitTarget("Long", CalculationMode.Price, takeProfitLong, true); }
Also I assume I'll need a new if statement asking for that reset, if you have any advice on that would appreciate. Thanks!
Comment