Code for avoiding the NFP

Forums ProRealTime English forum ProOrder support Code for avoiding the NFP

Viewing 7 posts - 1 through 7 (of 7 total)
  • #126849

    If I wanted to suspend a bot before and after the Non-farm Payroll announcement each month, would the following suffice?

    The dates are correct for the coming months, but I don’t know how far in advance they are published. Is there any way to specify the first friday of each month indefinitely?

     

    #126851

    Try this

     

    1 user thanked author for this post.
    #126855

    Ottima! I assume you mean to define the Nfp time elsewhere, in addition to this?

    #126858

    Maybe you can try to add the time range there (used your times)

     

    #126862

    Yes, something like that should work, with Nfp as an entry condition.

    If Day<8 and DayOfWeek=5″ is the crucial part that I couldn’t get my head around. Should work in the majority of cases although I just saw that this year the December figures weren’t released until Jan 10. Apart from that it should almost always be Day<8

    Thanks!

    #126876

    Well otherwise in order to avoid this, you can go maybe 1 time per year on the calendar, check and put in the code manually all the Fridays to exclude from the trading strategy

    #126881

    Yeah, as far as I can see the dates are published for the whole of each calendar year so doing it manually wouldn’t involve too much effort. Prob the only way to be sure of catching it every month.

    Not such an issue with longer TFs but the wild movements that usually occur could wreak havoc with short TF scalping bots.

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

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