> ExitShortStopMarket(DefaultQuantity,(High[1]+(1*TickSize))
And that works well.
However, I want to add a logical step so that the stop loss remains static until a position has moved in my favor. If I take a short at 4000, my stop loss is the previous candle's high at 4005, and the ATR is 5, I would like for that stop to remain at the high of the candle prior to entry UNTIL the price has moved 1.5 ATR in my favor. The stop would stay at 4005.25 until price has moved to 3992.5.
That leaves me with two questions.
1. How can I create a static stop loss in the strategy builder at the High of the candle prior to my entry?
This part I have no idea how to make work.
2. What logic would implement the trailing stop?
I think the correct logic would be
IF ALL
Position.MarketPosition = MarketPosition.Short
Position.GetUnrealizedProfitLoss(PerformanceUnit.T icks,DefaultInput[0]) = (ATR(14)[0]*1.5)
Do the following
> ExitShortStopMarket(DefaultQuantity,(High[1]+(1*TickSize))
I've attached a screenshot of the strategy in action using only the trailing stop with a drawing that shows what I want to happen.
Comment