//If BreakEven SL is active set breakeven SL + Buffer override protected void Execute(Position position) { if (BotState.IsThisBotId(position.Label)) { if (StopLossManager.IsBreakEvenStopLossActive) { StopLossManager.SetBreakEvenSLForAllPositions(BotState.LastProfitPositionEntryPrice, true); } } }
//If BreakEven SL is Active then set BreakEven Stop Losses for all orders if the current price is past the entry point of the Last position to close with profit override protected bool ExcuteRuleLogic() { if (BotState.OrdersPlaced && BotState.PositionsRemainOpen()) { if (StopLossManager.IsBreakEvenStopLossActive) { StopLossManager.SetBreakEvenSLForAllPositions(BotState.LastProfitPositionEntryPrice, true); return(true); } } return(false); }