I would appreciate advice on how to accomplish the following in a strategy for backtesting....
1) EnterLongLimit @ entryPrice
2) SetStopLoss @ stopLossPrice
3) define a trailStopPrice
4) if (High[0] > entryPrice+(trailStopPrice-stopLossPrice)
5) then change the stopLoss to a trailStop order
6) else exit the position at the stopLossPrice
The above basically describes a position with a fixed stop loss which becomes a trailing stop loss at a price trigger. I'm trying to figure out if I can simply change the order type or if I need to manually program a trailing stop within the strategy and use ExitLong(). I'd categorize my programming experience as advanced beginner, so a verbose reply is appreciated.
Thanks

Comment