Input:BS(-1),Stp(999),Mnth(1),Hold(14); vars:BSe(1),Mnthe(9),holde(20),TrdDayofYear(189); If next3rdfriday(0)=0 then value1=c; {++++++++++++++++++++++++++++ ENTRY AT EXPIRATION DAY ++++++++++++++++++++++++} if BSe=1 and TrddayofYEar=0 and Month(d)=Mnthe and Next3rdFriday(0)=0 then buy next bar 1 contracts market; if BSe=-1 and TrddayofYEar=0 and Month(d)=Mnthe and Next3rdFriday(0)=0 then sell short next bar 1 contracts market; {the above line trades from expiration to expiration-- exit lines below will exit based on a certain number of hold days (holde), exit at next expiration, or exit at stp % from entry } {+++++++++++++++++++++++ ENTRY FOR TRADE DAY OF YEAR +++++++++++++++++++++} if TrddayofYEar<>0 and BSe=1 and tdoy=TrdDayofYear then buy next bar 1 contracts market; if TrddayofYEar<>0 and BSe=-1 and tdoy=TrdDayofYear then sell short next bar 1 contracts market; {the above line trades from expiration to expiration-- exit lines below will exit based on a certain number of hold days (holde), exit at next expiration, or exit at stp % from entry } {++++++++++++++++++++++++++++ EXITS FOR LONG ENTRIES ++++++++++++++++++++++++++} If marketposition=1 and c < entryprice-(value1*Stp) then sell this bar c; If marketposition=1 and barssinceentry=Holde then sell this bar c; if holde=-1 and next3rdfriday(0)=0 then sell this bar c; {++++++++++++++++++++++++++++ EXITS FOR SHORT ENTRIES ++++++++++++++++++++++++++} If marketposition=-1 and c < entryprice-(value1*Stp) then buytocover this bar c; If marketposition=-1 and barssinceentry=Holde then buytocover this bar c; if holde=-1 and next3rdfriday(0)=0 then buytocover this bar c; Print(date,time,",",tdoy);