Just started on how to implement strategies and have SetStopLoss and SetProfitTarget. The problem I'm running into, is that once the Profit Target is hit, it will also immediately EnterLong again. Thanks in advance.
Protected override void Initialize() { SetStopLoss(CalculateMode.Ticks, MyStop); SetProfitTarget(CalculateMode.Ticks, MyTarget); } protected override void OnBarUpdate() { if(Position.MarketPosition == MarketPosition.Flat) { SetStopLoss(CalculateMode.Ticks,MyStop); } if(Condition 1) { EnterLong(); }
Comment