Closing Price January Higher than December Close

Forums ProRealTime English forum ProBuilder support Closing Price January Higher than December Close

  • This topic has 5 replies, 2 voices, and was last updated 3 weeks ago by avatarJS.
Viewing 6 posts - 1 through 6 (of 6 total)
  • #231197

    Good Morning!

    I have problems to get the right programmcode for this case:

    if one of the closing prices between the 5th and 10th trading day in January is above the previous year’s closing price then go long after the 24th trading day in any month if condition is met and not yet long.

    Sell if the closing price closes below SMA200 (minus 3%).

     

    Thank you very much.

     

    #231225

    @Admin: Can you switch the offer to ProOrder Support.

    That would be nice. Here on indicator it is wrong.

    #231235
    JS

    Hi,

    Try this one:

    1 user thanked author for this post.
    #231239

    @JS: Thank you very much! That is very nice.

    Can you shortly explain the meaning of Threshold.

    Thank you.

    #231240

    @JS: Thank you very much! That is very nice.

    Can you shortly explain the meaning of Threshold.

    Thank you.

    #231241
    JS

    Hi,

    If the Close>YearClose (in which the YearClose is the threshold) and the other day conditions are also true (Day>=5 and Day<=10) then the value of the threshold condition is equal to 1. (So, Close>YearClose and Day>=5 and Day<=10)

    I’ve broken this down in the code because you can’t check the given days (3) at the same time if:

    Day>=5 and Day<=10 and Day>24 (it is impossible that Day>=5 and Day<=10 AND Day>24) that’s why I’ve broken it down)

    I hope it’s a little clear, if not ask questions…

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

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