The strategy when flat starts with SetTrailStop called from OnBarUpdate. After a trade is entered and based on certain conditions I want to call SetStopLoss from OnBarUpdate to fix the stop loss to a specific price which may be changed with additional SetStopLoss calls. After the trade is exited SetTrailStop is called again to reset the stop to a default trailing stop.
Will such a sequence work? The documentation states that SetTrailStop and SetStopLoss cannot be mixed and SetStopLoss will override SetTrailStop. Is the override permanent or can SetTrailStop be restored when the strategy is flat again?
Thanks

Comment