Hi Matt,
Welcome to the Forum.
There are a few ways to tackle this:
The first is to better organise the logic of your entry and exit dates to make coding and management in MSFL easier, and avoid mistakes. Try grouping the dates by the longest term factor first i.e. years, then if necessary months, then days, hours, minutes etc. Also MS returns a boolean value of 1 or 0 depending on whether a condition can be expressed as true or false, so you dont need the If(something,1,0).
e.g.
|
{BUY} If((Year()=2005 AND Month()=10 AND DayOfMonth()=19) OR (Year()=2005 AND Month()=11 and DayOfMonth()=30) OR (Year()=2005 AND Month()=12 AND DayOfMonth()=1) OR (Year()=2005 AND Month()=12 AND DayOfMonth()=16) OR (Year()=2006 AND Month()=4 AND DayOfMonth()=12 OR (Year()=2006 AND Month()=5 AND DayOfMonth()=2)),1,0)
|
should have the same logic as:
|
{BUY}
(Year()=2005 AND (Month()=10 AND DayOfMonth()=19) OR (Month()=11 and DayOfMonth()=30) OR (Month()=12 and (DayOfMonth()=1 or DayOfMonth()=16)) ) OR (Year()=2006 AND (Month()=4 AND DayOfMonth()=12) OR (Month()=5 AND DayOfMonth()=2) )
|
note: this code was written in notepad and untested, so check the right number of brackets etc. but you should get the idea?
What are these dates? Is there some pattern to them that could be programmed? This is much preferred to maintaining a list.
The second way to do this would be to write an extrnal function to read the dates from a file or other extrnal source. This would require some extra programming knowledge and the MDK.
Hope this helps.
wabbit
MS: 6.52 EOD, 7.x EOD, 8.0 PRO, 9.2 PRO w/QC, 10 PRO w/QC & MDK
For custom MetaStock programming : http://www.wabbit.com.au
My SkyPE status : 
My SkyPE account : wabbit.com.au