sjsr
If you are trying to determine whether the High of two bars ago is within 1 percent of the Low of two bars ago then you could write the condition as follows if((high(-2)-low(-2))/low(-2)<=0.01
If that is not what you are trying to do then you need to provide further details as to what value the range of two bars ago must be less than 1 percent of.
Alex
Originally posted by sjsr How do I write in code that my (-2) bar High to Low has to be less then 1 percent
Here is what I wrote:
high(-2) - low (-2) < = *.01
Comment