For example
if (X is rising and Y > 0 and etc...) within the last 100 bars
&& (X is falling and Z < 0 and etc...)
then {draw vertical line}
How do incorporate that "within the last 100 bars" statement into the code?
In other words, when a set of conditions (ex: X is rising and Y > 0 and etc...) was met in the past (ex: 100 bars ago) and different set of conditions is met in the present (ex: X is falling and Z < 0 and etc...), and then the code executes (ex: draw vertical line), how can I code how long the present conditions 'look back to see' if the past conditions were met?
Thank you, NJ Team and Community.

Comment