- Topics: 54
- Replies: 77
- Posts: 131
I figured out a trick when I was doing similar research in the tester..
Lets say you want the 26th as your entry date however it might fall on a weekend like Matthew said, which will then skip to the next month.
Instead of it entirely skipping, maybe the following day was a Monday and it can enter then. Here is how to “Buy the next available date”
//Buy on the 26th (but if 26th is not a trading day, buy next available date within 5 bars
a1 = DAYNUM() >26 and DAYNUM() <31;
a2 = NOREPEAT(a1, BARS=5);