AFL code - Trading on concrete calendar dates

#1
Hello,
I would like to test an idea on strategy that trades on specific dates during the year only. I have defined concrete list of dates and want to back test this strategy that will on particular date buy on open and sell on close equities from certain basket. Unfortunately I cannot put together the code.
Software: Amibroker
Time frame: Daily
Equity basket: using Amibroker filter for watch list

I´ve put together simple code, but it is not functioning.

MyBuyDate = 1000103; //Testing date 3.1.2000
Dates = DateNum();
Buy = MyBuyDate = Dates;
BuyPrice = O;
Sell = C;
SellPrice = C;

Thank you for any suggestion of help.
Marek