How to shorten this single line of code

Is there a way to make this line shorter? There's a lot of repetition and only one value is changed.

(Ref(close,1)/close >=1.2 OR Ref(close,2)/close >=1.2 OR Ref(close,3)/close >=1.2 OR Ref(close,4)/close >=1.2 OR Ref(close,5)/close >=1.2) OR Ref(close,6)/close >=1.2 OR Ref(close,7)/close >=1.2 OR Ref(close,8)/close >=1.2))

How about: hhv(close, 9)/close >= 1.2
assuming that you really wish to look back and not forward as your original string was written. If you really do wish to look into the future, you can try '-' sign for period (I haven't tried it).


Last but not least, when posting the formula, please make sure that you use Code Tags (using </> code button) as explained here: How to use this site.

Using code button

Code tags are required so formulas can be properly displayed and copied without errors.

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.