[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Seasonal start and end dates



PureBytes Links

Trading Reference Links

Hi,

I bought a book 'Ultra-Reliable Seasonal Trades' - John Momsen.
It seems like a good book. Any thoughts?

I am trying to code up the first trade June T-Bonds #1.
It only trades 1st trading day after Jan 9th each year.
It exits 1st trading day after May 5th.

It would be nice to code it so it could look at any data.
So Jan 9th is the 9th day of year and May 5th is the 125th day of the year.
IF 9 < DayOfYear < 125 then

I attempted start as shown below but it doesn't seem to work.

Any thoughts for a new code writer?

Thanks,


Input: StartingDate(000109), EndingDate(000505);

IF Date > StartingDate then
	IF Date < EndingDate then

		begin
			If marketposition > -1 then
				Buy ("Seas Long") Highest(high,12) + 10
points stop;
			If marketposition < 1 then
				Sell ("Seas Short") Lowest(low,12) - 10
points stop;
		end;

If marketposition = 1 then if
	EntryPrice > Lowest(low,21) then
	ExitLong ("ExitL 21day") Lowest(low,21) - 1 points stop else
		ExitLong ("ExitL 5day") Lowest(low,5) - 1 points stop;
	
If marketposition = -1 then if
	EntryPrice < Highest(high,21) then
	ExitShort ("ExitS 21day") Highest(high,21) + 1 points stop else
		ExitShort ("ExitS 5day") Highest(high,5) + 1 points stop;

	

Thanks,

Andrew Richman

"Tree Tops"
344 Brown Mountain Road
Karoola, TAS, 7267
Phone: 03 63954311
Fax: +61 (3) 63954312
Mobile: 0418 725402
Andrew.Richman@xxxxxxxxxxxxx