I am a long time lurker but finally came to a problem I couldn't solve just by lurking.
I am in need of an indicator that plots a horizontal line on both the open and close of a candle that is changing trend. So basically, if a down candle has printed after printing many up candles, then draw then plot the horizontal line at the open and close prices, same for the opposite direction. The lines should disappear if a new direction is formed. I tried to use N bars up/down but couldnt get it to work. Let me know if anyone has any code/ideas!
Attached is a picture of how I would want the lines plotted.
Thanks
Comment