Dynamic variable change according to an indicator

Forums ProRealTime English forum ProBuilder support Dynamic variable change according to an indicator

Viewing 9 posts - 1 through 9 (of 9 total)
  • #85720

    Hello gentlemen,

    I am testing a lot of things and I realize that I can not really code a need that looks pretty simple: change a variable compared to the dynamic value of another indicator.

     

    An example is better than a long explanation, I put the code in question below:

    The code is not good because it does not give me the expected result at all.

    If you had a solution to my problem, it would be great 😉

     

    Thank you in advance for your help.

     

    Excellent day.

    #85721

    Do not double post the same topic in different language.

    This won’t earn you faster replies, while shattering info among related topics making that info harder to retrieve. Thanks.

    #85722

    Hello Roberto,

     

    Ok, I understand. I just wanted to have more opinions (differents culture, differents point of view, maybe)

    However, thank you for your advice.

     

    I wish you a good day.

    #85723

    It works the way you wrote it, it returns data filtered as you asked. Try this indicator:

    Atr is ALWAYS < 40 so line 2 will ALWAYS be true. If you switch lines 2 and 4 you’ll always get 51!

    #85725

    Thank you very much for you quick answer Roberto!

     

    I see in your screenshot that it’s Daily Time you chose.

    I wanted to add this indicator on 5 minutes or 15 minutes time. So ATR can be higher than 40, like DJ or DAX,…

    And it’s when I add this indicator in “minutes” time that it’s not working. Values are not update at end of each bar.

     

    Thank you again for yout help.

     

    Have a good day.

    #85733

    Apart from using it on a different instrument and TF, there is something wrong in the logic, because, as I pointed out,  because if you switch lines and get ALWAYS the opposit outcome it means conditions are not correct.

    What do lines 2 and 4 mean, why did you write conditions almost identical, if in line 2 ATR is < 40 line, line 4 will NEVER be executed.

    Maybe you wanted to use AND instead of OR? AND can replace OR in line 4, not in line 2.

    Please tell me what you want to check exactly.

     

    #85750

    Hello Roberto,

     

    Here are an image to show you exactly what I want to code 😉

     

    Thanks you for your kind help

     

    Have a perfect day

    #85754

    There you go

     

    #85998

    Tanks you very much Roberto, it works great!

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

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