I am programatically setting a dynamic stop loss to adjust as the high moves down from bar to bar in a short position. Basically, I've got my COBC = false, and if statements to set a value to a variable initially equal to the higher of the highs of the two previous bars before entry.
Then, I'm adjusting if the new high is lower than previous high. Finally, I've got the stop loss set to recalc every time current position == short and is equal to the previously mentioned value + a predetermined value.
When I backtest, the stop loss is hit immediately, every time (60/60 trades). Please advise what I'm doing wrong or if you need more info.
Thank you,
hbmiles2000

Comment