Time and Day conditions

Forums ProRealTime English forum ProOrder support Time and Day conditions

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

    Almost every trader loves selecting trading hours and trading days.

    The most common way is to use:

    Selecting different days and custom different hours each day is a bit longer, I suggest:

    so you can select DAYS by simply setting 0 or 1 after “=”, as you can select custom hours by changing starting and ending hours, such as starting later on Monday morning or Ending earlier on Friday night or not trading at all on Wednesday.

    You may want to use TIME instead of OPENTIME or DAYOFWEEK instead of OPENDAYOFWEEK as best suits your needs.

    You can use tdCond to (not) enter a trade:

     

    5 users thanked author for this post.
    #134463

    Link to above added as Log 220 to here …

    Snippet Link Library

    1 user thanked author for this post.
    #134538

    Thanks for the Time/day codes robertogozzi!

    I would love to hear how you guys and gals reason regarding Time and Date. Do you let the algos run 24/7 or have some time restrictions?

    #134539

    I let them run 24/7 (I am not a scalper).

    Some strategies of mine based on a 4h+ TF may stay open even a 2-3 weeks. On shorter TF’s they normally close quite soon, the same day or within a couple of days at the latest.

    Well… tht was a bit off topic. Yes, I always select custom operating time ranges (but once trades are opened I let them run).

    1 user thanked author for this post.
    #134550

    robertogozzi, so you have a time frame where you allow entering a trade, say for example between 9.00 – 18.00. Rest of the time is not allowed. But when in a trade you allow it to run 24/7…did I understand you correct?
    If so, is the time frame because of potential difference in spreads or different market behaviours? Or maby both?

    Thanks again for all nice codes and support!

    #134553

    I mainly trade DAX, so spread is higher (even 6 or more pips) and Volatility is lower after 22 (but I usually stop trading at 18/19)  till 9 the next morning.

    1 user thanked author for this post.
    #174074

    Hi Roberto,

    What is the most accurate and effective code of referencing the:

    • 8am bar of the current day AND;
    • The 16:15pm bar of the previous day AND;
    • The 8am bar of the previous day

    Irrespective of weekends (i.e. if Tuesday it references Tuesday and Monday and if Monday it references Monday and Friday)

    #174076

    There’s no way to access those bars with direct instructions, you need to save those BarIndex’s in variables as they show.

    Each new day each bar becomes yesterday’s bar:

     

    #174077

    To make it work only Mon to Fri:

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