I am trying to get my strategy to take a trade once the price has retraced at least 50% of the distance between that last swing high and last swing low. I am having a little issue with the swing highs and lows.
A long trade was placed during a backtest correctly at 4205 and the sell order was set correctly at the swing high of 4211.75. However, a new swing high was made at 4208 at the 7:36 bar and the sell limit was lowered and the trade was exited.
However, the price continued upward and that swing high of 4208 disappeared with the swing high of 4211.75 becoming the swing high again.
My swing strength is set to 3.
Please see the attached photo. I am trying to figure out how the swing could change like that. I thought the indicator was a lagging one so it should only chart a swing if one was truly made and once the bar closes.
If also included the code that handles my exits. I'm sure there is something I am doing wrong I just can't figure it out.
Thank you,
Nick
Comment