Highest high and highest low of previous days and of specific schedules

Forums ProRealTime English forum ProOrder support Highest high and highest low of previous days and of specific schedules

Viewing 9 posts - 31 through 39 (of 39 total)
  • #85632

    Flags and conditions do both may qualify either as true or false, thus easily tracked using GRAPH, the difference is that a condition is a test between two (sometimes even more) data, such as “close > close[1]” or “close CROSSES OVER Rsi[14]”, while a flag is a signal such as “flag” in this example or “daysforbidden” in some strategies when you do not want to trade or “TradeON” and so on….

    In the code

    “OpenDayOfWeek < 1 OR OpenDayOfWeek > 5” is the condition to be checked and you can graph it with

    it will yieald a True/False logical value assigned to DAYSFORBIDDEN, which is a flag (and you can GRAPH it by itself, without having to write the longer line above), like a traffic lights, they are a flag to signal that some time has passed (the condition previously set) since it changed colour and needs to be changed again, you see the flag changing colour.

    It is a common variable that may be either true or false, you can use any name, flag is just a nickname to make it easier to understand that it signals something.

    “pi = 3.14” is not a flag, PI is just a common variable holding a numeric value, not a logical value.

    The above code could have been written

    I hope I understood what you meant.

    #85633

    I hope I understood what you meant.

    Yes you did!

    Thank you for the comprehensive explanation.

    I’ve achieved same result in a long-winded way …  but I’ll set a flag / signal next time in my coding.

    Cheers
    GraHal

     

    #91942

    Hello,

    Thank you for code on how to get previous day high / low.

    But still, I dont understand this line :

    ll=close*1000

     

    Why do you set the variable to close * 1000 ?

     

    Thank you,

     

     

    #91944

    PS : Nothing is displayed on daily or even lower timeframes. Version is 10.3 and I apply the indicator on the price as recommended. Do you have any idea please ?

    #91946

    close * 1000 is just a way to assign variables all and ll a very high value the first time or whenever they needs to be reset, so that Min() can later assign them a correct value, I prefer writing ll=999999, but both achieve the same goal.

    To be able to enter any trade you must launch it from a TF whose candles close on anyone of the times in the strategy. If you refer time 143000, then you can only use a TF <= 30 minutes, if you want to use the Daily TF… you need to change the code but you will probably write another strategy.

     

    #91952

    Hello,

     

    Sure, for the min() function, I found it out a few minutes after ^^

    I changed the hours to use it on DAX :

    starthour = 013000
    endhour = 220000

     

    But still, even on 30 15 5  min or 1h, notjing is displayed.

     

    I just changed these hours.

    Thank you,

     

     

    #91954

    You should post your code, so I can replicate it.

    #92178

    Hello,

     

    Here is my code :

    I think the starthour format is not working…

     

    But I found this approach more satisfying :

    https://www.prorealcode.com/topic/configuration-plus-haut-plus-bas-precedent/

    #92217

    It’s beacuse the condition COUNT in line 4 is always 0, since both TODAY and DATE return the same value.

    Also, bear in mind that math applied to dates does not yield correct result (as in spreadsheets), TODAY – 30 will not return the date of 30 days ago, if today is 20190220, it will return 20190190.

Viewing 9 posts - 31 through 39 (of 39 total)

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