Turn of Month Seasonality

Hi ,

I want to do a trade testing using turn of month( i.e buying on 26th and selling on 5th), can someone please help me how to go about it

Regards

Hi,

You can use the DayNum() function if you wish to specify a Buy / Sell signal based on a date only.

https://help.optuma.com/kb/faq.php?id=1200

For the 26th for example you would use:

DAYNUM() == 26

And for the 5th…

DAYNUM() == 5

Keep in mind, that on a Trading Day chart where weekends and holidays are skipped, there is not always a 26th or 5th that occurs.

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”

//set entry
//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);
a2

Jeff