Hello Folks,
As always I'm playing with some coding.
My task for today is the following:
I want that the EA does "print" an information on certain dates every year:
Example dates: Jan-01; Dec-24; Dec-31
How do I write the code for this?
It's a bit confusing for me. First I wanted to write it like this:
But while I was writing it, I realized that this code won't do what I wanted want it to do...
I know I could use "TimeDayOfYear", but this gets screwy as soon as we have a year where Feb has 29 days, because Dec-31 would not be Day 366 instead of 365.
Is anybody able to help me out?
Greetings.
MikeFT
As always I'm playing with some coding.
My task for today is the following:
I want that the EA does "print" an information on certain dates every year:
Example dates: Jan-01; Dec-24; Dec-31
How do I write the code for this?
It's a bit confusing for me. First I wanted to write it like this:
Inserted Code
if (Day()!=1 && Month()!=1 && Day()!=24 && Month()!=12 && Day()=!31 && Month()!=12) { Print("Market is closed"); }
I know I could use "TimeDayOfYear", but this gets screwy as soon as we have a year where Feb has 29 days, because Dec-31 would not be Day 366 instead of 365.
Is anybody able to help me out?
Greetings.
MikeFT