The attached SwingLine code plots the grey line on a chart (also attached). The line should reach the highest high before turning lower (upon three consecutive lows) and touch the lowest low before turning up (after three consecutive higher highs). On chart where the plot is not as desired, I have manually drawn red lines in the correct fashion.
Help in correcting and/or completing the code would be greatly appreciated.
Please ignore the Mov Avg Exponential; it is just that I have temporarily pasted the code in the Mov Avg Exponential PLEditor window.
khalaad