Detecting a RANGE

Forums ProRealTime English forum ProOrder support Detecting a RANGE

Viewing 4 posts - 1 through 4 (of 4 total)
  • #10324

    I am trying to figure out how to write a piece of code to detect whether the last, say, 50 bars were in a range of less than 20 pips. In this case I would not enter any trade even if conditions are met.

    I wrote:

    IF range[50] < 20 THEN

    ……

    ENDIF

    But it seems not to work.

    Can anyone help me?  Thank you.

    #10338

    What you need here is to determine the highest high and the lowest low of the last 50 bars, then test if their  difference is more or less 20 pips.

     

    #10348

    Thank you very much Nicolas, that’s exactly what I wanted.

    So what does RANGE[50] do?

    Thanks.

    #10365

    Range returns the range of the selected bar only.

Viewing 4 posts - 1 through 4 (of 4 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login