Compare Close to +0.1 through to 0.9 and -0.1 through to -0.9 of a variable

Forums ProRealTime English forum ProBuilder support Compare Close to +0.1 through to 0.9 and -0.1 through to -0.9 of a variable

Viewing 7 posts - 1 through 7 (of 7 total)
  • #69151

    Hi

    I want to be able to evaluate the close value of a candle to see if it matches another variable.

    For example, let’s say the close value of a candle is 12,347.0 and I have a level called sup1 at 12,347.8 that I care about. How can I match these to decimal points?

    I don’t want to just ROUND the Close and sup1 (which in this case wouldn’t work as 12,347 would not match 12,348) Even if ROUND did get close, I want to evaluate the decimal points.

    If Close = sup1+0.1 OR Close = sup1+0.2 OR Close = Sup1+0.3 …….. OR close = sup1-0.1 OR close = Sup1-0.2 OR Close = Sup1-0.3 ……. THEN DRAWHLINE(sup1)coloured(0,200,0)

    I’m struggling to get the comparison working.

    Thanks

    Rob

    #69543

    Any pointers from anyone please?

    Thanks

    Rob

    #69547

    Thos will allow you to validate CLOSE as “touching the line” when it is within a 0.3-pip range below or above it:

     

    1 user thanked author for this post.
    #69624

    You can create a function-like indicator, like this one (I also attach the .ITF file to be imported), which needs to be installed by ProBuilder but shouldn’t added to charts, just kept within ProBuilder itself to be called by strategies:

    This is a stupid strategy just to test it:

     

     

     

    2 users thanked author for this post.
    #69627

    If you want to verify whether CLOSE is within +- 0.5 pips from the HIGHEST high of the previous 10 bars you may write:

     

    4 users thanked author for this post.
    #69633

    Thanks Robert,

    I will be working on this later!

    #70008

    Many thanks Roberto, your first answer has turned out to be the simplest in this case.

    Thanks again, Robert

    1 user thanked author for this post.
Viewing 7 posts - 1 through 7 (of 7 total)

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