Equal to highest percentage change in 2 days

Forums ProRealTime English forum ProOrder support Equal to highest percentage change in 2 days

Viewing 5 posts - 1 through 5 (of 5 total)
  • #41359

    Hello

    Issue with percentage change. The idea is following:

    “The precentage change today should be equal to the highest percenage change in 2 days. Measured close to close.”

    I am trying to use the simplified creation as far as I can and then supplement the strategy manually in the end. With Variation I have added following (c7):

    // Conditions to enter short positions
    c4 = (close[1] > close[2])
    c5 = (close > close[1])
    indicator4 = Average[200](close)
    c6 = (close < indicator4)
    indicator5 = Variation(close)
    c7 = (indicator5 = indicator5[2])

    So question is how do I rewrite the code so its equal to the highest percenage change in 2 days (close to close)?
    As it is right now, checks only 2 days ago. Maybe its even possible to do it with simplified creation?

    #41968

    if your 2 days variations are “yesterday to today” and “day before yesterday to yesterday” then you’d want:
    c7 = indicator5>=indicator5[1]

    #42347

    Thanks for your answer.

    Would I be able to write the code like this:

    c9 = variation(close) >= (variation(close[1]) and variation(close[2]))

    So, variation today is equal or higher than (the variation yesterday and the day before yesterday)?

    #42393

    No, you need to type 2 times the condition:

     

    1 user thanked author for this post.
    #42416

    Thanks and appologies for my “beginner” questions… 🙂

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

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