Artificial bar for monday?

Hello,

I trade at the open with monthly rotation, using daily data. As yesterday was Good Friday, there is no bar for yesterday. Amibroker thinks next session is 3/29, so I cannot see the trades for monday april 1st (see attached, artificial bar is selected):

Any idea? Thanks

@Armin_Tamzarian, in general, this issue in many trading platforms is solved using an external "holidays" file that contains references to market future holidays (this kind of lists could be imported in AB as an extra ticker using the Date field to store dates and the other fields for other purposes).

Something similar was discussed here:

(be sure to read the @Tomasz comment) and here:

Probably the quickest (dirty) fix for now is to add a condition to your rotation "day" rule with an OR like: (to adjust as needed)

rotation = yourEndOfMonthRule OR DateNum() == 1240328; // adding more dates for other next occasions
1 Like

Thank you very much Beppe! That helps a lot.
The approach with an extra ticker is definitely one that I wouldn't have found on my own.

@Armin_Tamzarian, re the .cvs file referenced in the article of the second link, take it with a grain of salt. I verified that it has some wrong entries in the past (and indeed there is no need to add past dates if you have a reliable data source with no holes, like Norgate, since in the analysis you can use a future bar).

I suggest building it on your own, adding exclusively future dates (updating it from time to time) checking the official exchanges' holidays' calendars.

1 Like