Hi, I would like to count the number of consecutive bars an oscillator spends in oversold before moving back to neutral. And if it has exceeded 8 bars in the oversold zone, to shade the remainder of the bars until it moves back to neutral.
could someone show me how to write the script for the above instructions?
Hi KZ, The basis of overbought/oversold is from an indicator known as TD Range Expansion Index, where overbought > +45 and oversold < -45. I've managed to get that bit done. What I'm trying to add to the indicator now is known as TD Price Oscillator Qualifier which assist to determine the strength of either the oversold or overbought readings.
These indicators are part of tom demark's market timing indicators.
I'm just trying to create the indicator at this point in time. If you see the attached chart, what I want to do is 1) to shade the respective area if the oscillator remains consecutively in oversold/overbought for more than 8 bars.
As my programming skills are almost non-existant, I appreciate all the help that I can get.