Prevent you from operating a specific month and week

Forums ProRealTime English forum ProOrder support Prevent you from operating a specific month and week

Viewing 6 posts - 1 through 6 (of 6 total)
  • #173300

    I am trying, but in vain, not to operate in a month and week of the year.
    Example I would like to prevent opening a position in the first and third week of October.
    If anyone is able to help me
    Thank you

    #173308

    DATE & TIME data typee are not supported, so MATH (eXcel-like) functions are not available.
    There’s a workaround… just wait for the desired month and start counting weeks. The one that contains day 1 is the first week if that day is on Thursday or earlier (4+ out of 7 days must belong to the new month), otherwise it’s the last week of the prior month despite having day 1.
    You start enabling trading and will disable it when the required weeks show.
    This is an indicator you can add to your chart to tell week number for October:

    and this is the strategy:

    2 users thanked author for this post.
    #173312

    Thanks Roberto,
    Very kind as always.

    #173315

    It works wonders
    Thanks again

    #173335

    I modified it so that you can either:

    • choose any month (and any week in it)
    • choose any week of the year based solely on its year week ID
    • choose any whole month

    you change line 62 to use more months:

    or use it for yearly week ID (1 to max 53):

    or use any other combination of the three values:

     

     

     

     

    #173340

    Definitely complete.
    Thanks now I try it.

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