Inputs:{*******SETUP PARAMETERS****} Setup(9), {Number of Bars needed for Setup} Lookback(4), {Reference bar of Setup} Su_Price(Close), {Price used for comparison during Setup} SetUp_EQ(False), {If true, comparison above during Setup uses <= and >= If false, comparrison uses < and >.} SS_Pric1(Low), {"Price" used to collect Sell Setup Low "Price", will be compared to during countdown for possible recycle} SS_Pric2(High), {"Price" used during Countdown to compare to Low Price formed during SetUp for recycle}

{*******INTERSECTION PARAMETERS****}Int_On(false), {If true, requires intersection if false, no intersection required} I_Signal(8), {First Bar of Setup to look for intersection} I_Flag(True), {If true, looks for intersection during and after the setup is complete If false, then looks for intersection only during SetUp, starting with "I_Signal" bar}

{*******COUNTDOWN PARAMETERS****} ContDown(13), {Number of Bars needed for Countdown} C_Look(2), {Reference bar of CountDown} CS_Price(Close), {"Price" used to compare to High of "2" bars ago during a "Sell" CountDown} Count_EQ(True); {If true, comparrison of prior bar uses <= and >= If false, comparrison of prior bar uses < and >.}

Inputs:{*******RECYCLE PARAMETERS****}{***Note - A "Recycle" causes all of the CountDown Numbers to be removed from the Chart***} Before(True), {If true and you get a 9 setup in the same direction before the completion of countdown, you "RECYCLE" - Restart Countdown} On13(True), {If true and you get a 9 setup in the same direction ON the completion of countdown, you "RECYCLE" - Restart Countdown} After(True), {If true and you get a 9 setup in the same direction after the completion of countdown, AND there has not been an intervening "1" Setup counter in the opposite direction since the completion of CountDown, you "RECYCLE" - Restart Countdown} Ignre1st(False), {If true, the first occurance of a "Recycle" will be ignored. In this case, it will Recycle the 1st time there is a subsequent new 9 count. If false, it will Recycle on the first occurance of a new 9 count} IgnreSml(True), {If true, a subsequent new 9 count will be ignored if it has a smaller true range from high to low} SmlFactr(1), {Used to determine a smaller true range. 1.00 = Any smaller true range .50 = Any true range that is half the size of the initial} IgnreLrg(True), {If true, a subsequent new 9 count will be ignored if it has a larger true range from high to low} LrgFactr(1.618), {Used to determine a larger true range. 1.618 = Any true range that is more than 1.618 times the initial 1.00 = Any larger true range}

{*******Qualifier Parameters********}{**This section allows us to to compare any 2 prices for additional confirmation. You can compare a Setup bar to another Setup bar, a SetUp bar to a CountDown bar or a CountDownBar to another CountDown Bar. The comparrison is in the format of : if Price of Qual1 is < Price of Qual2 then the Sequential is qualified (For a Buy Setup). It would be ">" for a Sell Setup. An optional "=" sign is available for <= (>=)**}Qualify(True), {If true, perform this additional qualification}Q_Price1(Close), {Price of first Qualifier}Q_Price2(Close), {Price of Second Qualifier}Q_Type1(2), {A "1" represents a bar in the SetUp phase of Sequential} {A "2" represents a bar in the CountDown Phase of Sequential}Q_Type2(2),Q_Bar1(13), {This represents the Number of the bar in that phase}Q_Bar2(8),Q_UseEq(True), {If true, uses <= or >= for comparrison}{***For example: If you want to say that for a Buy Sequential, the close of the 6 CountDown bar has to be < the close of the 8 Setup bar, you would set the following parameters. Q_Price1(close) USE CLOSE Q_Price2(close) USE CLOSE Q_Type1(2) CountDown Phase Q_Type2(1) SetUp Phase Q_Bar1(6) Bar # 6 Q_Bar2(10) Bar # 10 Q_UseEq(false) Don't use = sign in comparrison}

Color(Tool_Red),Pt_Ofset(0),AlrtBars(5); {If an alert is used, the Alert will be active this number of bars after the initial alert}

if SetUp_EQ = false thenbegin if Su_Price = Su_Price[Lookback] then MySwitch = 0; if Su_Price > Su_Price[Lookback] then MySwitch = 1; {***Looking for a Sell Set Up*****} if Su_Price < Su_Price[Lookback] then MySwitch = -1; {***Looking for a Buy Set Up*****}endELSEbegin if Su_Price = Su_Price[Lookback] then MySwitch = MySwitch[1]; {= so use last MySwitch} if Su_Price > Su_Price[Lookback] then MySwitch = 1; {***Looking for a Sell Set Up*****} if Su_Price < Su_Price[Lookback] then MySwitch = -1; {***Looking for a Buy Set Up*****}end;

if OK2CountDown thenbegin {***Continue CountDown***} if Direction = 1 then begin {***Looking for a Sell setup***}

{***Have we gone below the Low "Price of the Setup? If condition1 is true, it is OK to proceed. If not, we must recycle***} condition1 = (SS_Pric2>SetUpLow and SetUp_EQ) or (SS_Pric2>=SetUpLow and SetUp_EQ=false); if Condition1 = false then begin {***Exceeded low, must recycle***} OK2CountDown = false; AutoMaticRecycle = true; end;{***Check "Price" of current Bar with high of "2" bars ago***} CountPrice = CS_Price; if Condition1 then condition2 = (Count_EQ and CountPrice >= high[C_Look]) or (Count_EQ = false and CountPrice > high[C_Look]); if Condition1 and Condition2 then begin CountDown = CountDown + 1; {***Added a new bar to countdown, see if we need to save it for a Qualification***} if Qualify then begin if Q_Type1 = 2 and Q_Bar1 = CountDown then Qual1 = Q_Price1; if Q_Type2 = 2 and Q_Bar2 = CountDown then Qual2 = Q_Price2; end; end;

{*If we get a 9 count in the same direction, we may or may not Recycle*}

if MySwitch = 1 and LastCountDown = ContDown and LastCountDown[1] = ContDown and After and MRO(MySwitch=-1,Barnumber-_13Bar,1) = -1 then Recycle = true; if MySwitch = 1 and (OK2Countdown or CountDown = ContDown) then begin if CountDown < ContDown and Before and CountDown <> 0 then Recycle = true; if CountDown = ContDown and CountDown[1] <> ContDown and ON13 then Recycle = true;

if Recycle or (AutoMaticRecycle and CountDown <> 0) thenbegin {**May be OK2 Recycle***} {If we ARE NOT ignoring the 1st Recycle, then cancel Countdown If AutoMaticRecycle is true, then cancel Countdown If this IS NOT the 1st Recycle, cancel Countdown} if ((Ignre1st = false) or AutoMaticRecycle or (Ignre1st and FirstRecycle = false)) then begin {****Remove Numbers****}{***Turn off Alert***} AlertBarNum = -1000; if CountDown = 0 then Value86 = LastCountDown else value86 = CountDown; for x = 1 to Value86 begin value2 = Text_Delete(RefNum[x]); end;

{***Check "Price" of current Bar with high of "2" bars ago***} CountPrice = CS_Price; if Condition1 then condition2 = (Count_EQ and CountPrice >= high[C_Look]) or (Count_EQ = false and CountPrice > high[C_Look]); if Condition1 and Condition2 then begin CountDown = 1; {***Added a new bar to countdown, see if we need to save it for a Qualification***} Stringg = NumToStr(CountDown,0); if Qualify then begin if Q_Type1 = 2 and Q_Bar1 = CountDown then Qual1 = Q_Price1; if Q_Type2 = 2 and Q_Bar2 = CountDown then Qual2 = Q_Price2;{***Code added 2/24/97 if we do not qualify, postpone countDown, put an * on chart and continue CountDown. ***}