Announcement

Collapse
No announcement yet.

Ignoring the first 5 trading days of each month

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Ignoring the first 5 trading days of each month

    Hello

    I’m trying to find a way to write an IF statement on every new month the EFS will not start calculating until 5 TRADING days passes and then it will calculated for the rest of the month.

    Here is the beginning

    if(month(0)!=month(-1)){


    How do you make it ignore the first 5 trading days of each month.

    Thank you

    Ketoma

  • #2
    I actually got on here because I wanted to do something similar. I'd like to modify my exising study so that if its between 11:30 and 14:00 (deadzone) that it will pass on taking any trades. Any ideas?

    Thx

    Geoff

    Comment


    • #3
      Here is a scheme for the first 5 days...
      Find out if the month is starting by using your example
      or use if day(0) < day(-1)// i.e. todays date is less than yesterdays ie a new month
      then set a variable to 0
      then every day(0) > day(-1) increment variable by 1 til the variable =5 then start your routine

      Comment

      Working...
      X