Thanks for the effort to answer my question. Jeez you must be of...

  1. 1,315 Posts.
    lightbulb Created with Sketch. 2
    Thanks for the effort to answer my question. Jeez you must be of the Trade View sales trader now

    So yesterday I was struggling to define the previous supports and resistances as shown below.

    The idea is when the distance between each resistance or support is getting narrower, thus indicating buying wave exhaustion in this case, I'd enter as shown in the arrow.

    I initially went with a very dumb way which is to count each bar or look back at 'n' bars but this morning I had a light bulb moment - what if I could use 'ZigZag' indicator and make the turning points as support/resistance and my gawd the result was impressive but I haven't put this into the code yet - will do this later this afternoon.

    Capture.PNG
 
arrow-down-2 Created with Sketch. arrow-down-2 Created with Sketch.