DeMark's Sequential™ Trading System
This will tell us how high the market washout rate is.
Submitted by Maurice Odekerken from Holland.
=====================
Hi friends.....I have found this code some where but i didn't
remember where from it has been copied. But the author name is given
above. Can anybody try to write this trading system in afl language.
If not possible we ask Tomasz.
In example chart (not shown here) perfectly placed numbers above or
below price as per Demarks explanation in his articles. 1-9 and
countdown 13 and buy signal a-b-c like that. So, as per this formula
every price bar has it's own number either 1-9 or 1-13 or buy signal
of a-b-c or 'p' for prerequisite.
Thanks.
Buy Indicators :
==code starts======
TD - SetUp-Buy
TD1:=If(C<Ref(C,-4),1,0);
TD2:=If(TD1=1 AND Ref(TD1,-1)=1 AND Ref(TD1,-2)=1 AND Ref(TD1,-3)=1
AND
Ref(TD1,-4)=1 AND Ref(TD1,-5)=1 AND Ref(TD1,-6)=1 AND Ref(TD1,-7)=1
AND
Ref(TD1,-8)=1, 1,0);
TD3:=If(Ref(C,-9)>=Ref(C,-13),1,0);
TD4:=If(TD2=1 AND TD3=1,1,0);
TD5:=If(H>=Ref(LLV(L,5),-3),1,0);
D8:=If(Ref(TD4,1)=1 AND TD5=1,1,0);
D9:=If(TD4=1 AND TD5=1 AND Ref(D8,-1)<>1,1,0);
D10:=If(Ref(TD4,-1)=1 AND TD5=1 AND Ref(D8,-2)<>1 AND Ref(D9,-1)
<>1,1,0);
D11:=If(Ref(TD4,-2)=1 AND TD5=1 AND Ref(D8,-3)<>1 AND Ref(D9,-2)<>1
AND
Ref(D10,-1)<>1,1,0);
D12:=If(Ref(TD4,-3)=1 AND TD5=1 AND Ref(D8,-4)<>1 AND Ref(D9,-3)<>1
AND
Ref(D10,-2)<>1 AND Ref(D11,-1)<>1,1,0);
D13:=If(Ref(TD4,-4)=1 AND TD5=1 AND Ref(D8,-5)<>1 AND Ref(D9,-4)<>1
AND
Ref(D10,-3)<>1 AND Ref(D11,-2)<>1 AND Ref(D12,-1)<>1,1,0);
D14:=If(Ref(TD4,-5)=1 AND TD5=1 AND Ref(D8,-6)<>1 AND Ref(D9,-5)<>1
AND
Ref(D10,-4)<>1 AND Ref(D11,-3)<>1 AND Ref(D12,-2)<>1 AND Ref(D13,-1)
<>1,1,0);
D15:=If(Ref(TD4,-6)=1 AND TD5=1 AND Ref(D8,-7)<>1 AND Ref(D9,-6)<>1
AND
Ref(D10,-5)<>1 AND Ref(D11,-4)<>1 AND Ref(D12,-3)<>1 AND Ref(D13,-2)
<>1 AND
Ref(D14,-1)<>1,1,0);
D16:=If(Ref(TD4,-7)=1 AND TD5=1 AND Ref(D8,-8)<>1 AND Ref(D9,-7)<>1
AND
Ref(D10,-6)<>1 AND Ref(D11,-5)<>1 AND Ref(D12,-4)<>1 AND Ref(D13,-3)
<>1 AND
Ref(D14,-2)<>1 AND Ref(D15,-1)<>1,1,0);
D17:=If(Ref(TD4,-8)=1 AND TD5=1 AND Ref(D8,-9)<>1 AND Ref(D9,-8)<>1
AND
Ref(D10,-7)<>1 AND Ref(D11,-6)<>1 AND Ref(D12,-5)<>1 AND Ref(D13,-4)
<>1 AND
Ref(D14,-3)<>1 AND Ref(D15,-2)<>1 AND Ref(D16,-1)<>1,1,0);
SetUp:=D8+D9+D10+D11+D12+D13+D14+D15+D16+D17;
SetUp
===========================
TD Count Down Buy A
Cum(If(C<Ref(CLOSE,-2),1,0)) - ValueWhen(1,Ref(Fml("TD - SetUp-
Buy" ), 1)=1,
Cum(If(C<Ref(C,-2),1,0)))
TD Count Down Buy B
If(Fml("TD Count Down Buy A")>=14 AND C>Ref(C,-4),1,0)
TD Count Down Buy C
If(Fml("TD Count Down Buy A")>=14 AND C>Ref(H,-2),1,0)
Buy Experts :
Type / Change in Highlights:
Buy Bullish SetUp
{Color: Cyan}
Fml( "TD - SetUp-Buy" ) =1 OR
Ref( Fml( "TD - SetUp-Buy" ) ,1)=1 OR
Ref( Fml( "TD - SetUp-Buy" ) ,2)=1 OR
Ref( Fml( "TD - SetUp-Buy" ) ,3)=1 OR
Ref( Fml( "TD - SetUp-Buy" ) ,5)=1 OR
Ref( Fml( "TD - SetUp-Buy" ) ,6)=1 OR
Ref( Fml( "TD - SetUp-Buy" ) ,7)=1 OR
Ref( Fml( "TD - SetUp-Buy" ) ,8)=1
Buy Count Down
{Color: Blue}
( Fml( "TD Count Down Buy A" ) =13
AND Ref( Fml( "TD Count Down Buy A" ) ,-1 )<> 13) OR
( Fml( "TD Count Down Buy A" ) =12
AND Ref( Fml( "TD Count Down Buy A" ) ,-1 )<> 12) OR
( Fml( "TD Count Down Buy A" ) =11
AND Ref( Fml( "TD Count Down Buy A" ) ,-1 )<> 11) OR
( Fml( "TD Count Down Buy A" ) =10
AND Ref( Fml( "TD Count Down Buy A" ) ,-1 )<> 10) OR
( Fml( "TD Count Down Buy A" ) =9
AND Ref( Fml( "TD Count Down Buy A" ) ,-1 )<> 9) OR
( Fml( "TD Count Down Buy A" ) =8
AND Ref( Fml( "TD Count Down Buy A" ) ,-1 )<> 8) OR
( Fml( "TD Count Down Buy A" ) =7
AND Ref( Fml( "TD Count Down Buy A" ) ,-1 )<> 7) OR
( Fml( "TD Count Down Buy A" ) =6
AND Ref( Fml( "TD Count Down Buy A" ) ,-1 )<>6) OR
( Fml( "TD Count Down Buy A" ) =5
AND Ref( Fml( "TD Count Down Buy A" ) ,-1 )<> 5) OR
( Fml( "TD Count Down Buy A" ) =4
AND Ref( Fml( "TD Count Down Buy A" ) ,-1 )<> 4) OR
( Fml( "TDCount Down Buy A" ) =3
AND Ref( Fml( "TD Count Down Buy A" ) ,-1 )<>3) OR
( Fml( "TD Count Down Buy A" ) =2
AND Ref( Fml( "TD Count Down Buy A" ) ,-1 )<>2)
Buy A
{Color: Green}
( Fml( "TD Count Down Buy A" ) =14 AND Ref( Fml( "TD Count DownBuy
A" ),-1)<> 14)
Buy B
{Color: Green}
A:=If( Fml( "TD Count Down Buy A" ) =14
AND Ref( Fml( "TD Count Down Buy A" ) ,-1 )<> 14,1,0);
B:=If( Ref(Fml( "TD Count Down Buy B" ),-1) =1,1,0);
HighestSinceBars(1,A =1,A )<HighestSinceBars(1,B=1,B ) AND Fml( "TD
Count Down Buy B" ) =1
Buy C
{Color: Green}
A:=If( Fml( "TD Count Down Buy A" ) =14
AND Ref( Fml( "TD Count Down Buy A" ) ,-1 )<> 14,1,0);
B:=If( Ref(Fml( "TD Count Down Buy C" ),-1) =1,1,0);
HighestSinceBars(1,A =1,A )<HighestSinceBars(1,B=1,C ) AND
Fml( "TD CountDown Buy C" ) =1
Type / Change in Symbols:
SetUp9
{Label: 9 / Font: 8 / Color: Magenta / Position: Below / Graphics:
None}
Fml( "TD - SetUp-Buy" )=1
SetUp8
{Label: 8 / Font: 8 / Color: Magenta / Position: Below / Graphics:
None}
Ref( Fml( "TD - SetUp-Buy" ),1)=1
SetUp7
{Label: 7 / Font: 8 / Color: Magenta / Position: Below / Graphics:
None}
Ref( Fml( "TD - SetUp-Buy" ) ,2)=1
SetUp6
{Label: 6 / Font: 8 / Color: Magenta / Position: Below / Graphics:
None}
Ref( Fml( "TD - SetUp-Buy" ) ,3)=1
SetUp5
{Label: 5 / Font: 8 / Color: Magenta / Position: Below / Graphics:
None}
Ref( Fml( "TD - SetUp-Buy" ) ,4)=1
SetUp4
{Label: 4 / Font: 8 / Color: Magenta / Position: Below / Graphics:
None}
Ref( Fml( "TD - SetUp-Buy" ) ,5)=1
SetUp3
{Label: 3 / Font: 8 / Color: Magenta / Position: Below / Graphics:
None}
Ref( Fml( "TD - SetUp-Buy" ) ,6)=1
SetUp2
{Label: 2 / Font: 8 / Color: Magenta / Position: Below / Graphics:
None}
Ref( Fml( "TD - SetUp-Buy" ) ,7)=1
SetUp1
{Label: 1 / Font: 8 / Color: Magenta / Position: Below / Graphics:
None}
Ref( Fml( "TD - SetUp-Buy" ) ,8)=1
CountDown1
{Label: 1 / Font: 8 / Color: Brown / Position: Below / Graphics:
None}
Fml( "TD Count Down Buy A" ) =2 AND Ref( Fml( "TD Count Down Buy
A" ) ,-1)<>2
CountDown2
{Label: 2 / Font: 8 / Color: Brown / Position: Below / Graphics:
None}
Fml( "TD Count Down Buy A" ) =3 AND Ref( Fml( "TD Count Down Buy
A" ) ,-1 )<> 3
CountDown3
{Label: 3 / Font: 8 / Color: Brown / Position: Below / Graphics:
None}
Fml( "TD Count Down Buy A" ) =4 AND Ref( Fml( "TD Count Down Buy
A" ) ,-1)<> 4
CountDown4
{Label: 4 / Font: 8 / Color: Brown / Position: Below / Graphics:
None}
Fml( "TD Count Down Buy A" ) =5 AND Ref( Fml( "TD Count Down Buy
A" ) ,-1 )<> 5
CountDown5
{Label: 5 / Font: 8 / Color: Brown / Position: Below / Graphics:
None}
Fml( "TD Count Down Buy A" ) =6 AND Ref( Fml( "TD Count Down Buy
A" ) ,-1)<> 6
CountDown6
{Label: 6 / Font: 8 / Color: Brown / Position: Below / Graphics:
None}
Fml( "TD Count Down Buy A" ) =7 AND Ref( Fml( "TD Count Down Buy
A" ) ,-1 )<> 7
CountDown7
{Label: 7 / Font: 8 / Color: Brown / Position: Below / Graphics:
None}
Fml( "TD Count Down Buy A" ) =8 AND Ref( Fml( "TD Count Down Buy
A" ) ,-1)<> 8
CountDown8
{Label: 8 / Font: 8 / Color: Brown / Position: Below / Graphics:
None}
Fml( "TD Count Down Buy A" ) =9 AND Ref( Fml( "TD Count Down Buy
A" ) ,-1 )<> 9
CountDown9
{Label: 9 / Font: 8 / Color: Brown / Position: Below / Graphics:
None}
Fml( "TD Count Down Buy A" ) =10 AND Ref( Fml( "TD Count Down Buy
A" ) ,-1)<> 10
CountDown10
{Label: 10 / Font: 8 / Color: Brown / Position: Below / Graphics:
None}
Fml( "TD Count Down Buy A" ) =11 AND Ref( Fml( "TD Count Down Buy
A" ) ,-1)<> 11
CountDown11
{Label: 11 / Font: 8 / Color: Brown / Position: Below / Graphics:
None}
Fml( "TD Count Down Buy A" ) =12 AND Ref( Fml( "TD Count Down Buy
A" ) ,-1)<> 12
CountDown12
{Label: 12 / Font: 8 / Color: Brown / Position: Below / Graphics:
None}
Fml( "TD Count Down Buy A" ) =13 AND Ref( Fml( "TD Count Down Buy
A" ) ,-1)<> 13
CountDown13
{Label: Buy A / Font: 9 / Color: Green / Position: Below / Graphics:
Buy Arrow )
Fml( "TD Count Down Buy A" ) =14 AND Ref( Fml( "TD Count Down Buy
A" ) ,-1 )<> 14
Buy B
{Label: Buy B / Font: 9 / Color: Green /Position: Below / Graphics:
Buy Arrow )
A:=If( Fml( "TD Count Down Buy A" ) =14 AND Ref( Fml( "TD CountDown
Buy A") ,-1 )<> 14,1,0);
B:=If( Ref(Fml( "TD Count Down Buy B" ),-1) =1,1,0);
HighestSinceBars(1,A =1,A )<HighestSinceBars(1,B=1,B ) AND Fml( "TD
Count Down Buy B" ) =1
Buy C
{Label: Buy C / Font: 9 / Color: Green /Position: Below / Graphics:
Buy Arrow )
A:=If( Fml( "TD Count Down Buy A" ) =14 AND Ref( Fml( "TD CountDown
Buy A") ,-1 )<> 14,1,0);
B:=If( Ref(Fml( "TD Count Down Buy C" ),-1) =1,1,0);
HighestSinceBars(1,A =1,A )<HighestSinceBars(1,B=1,C ) AND Fml( "TD
Count Down Buy C" ) =1
Sell Indicators :
TD - SetUp-Sell
TD1:=If(C>Ref(C,-4),1,0);
TD2:=If(TD1=1 AND Ref(TD1,-1)=1 AND Ref(TD1,-2)=1 AND Ref(TD1,-3)=1
AND Ref(TD1,-4)=1 AND
Ref(TD1,-5)=1 AND Ref(TD1,-6)=1 AND Ref(TD1,-7)=1 AND Ref(TD1,-8)
=1,1,0);
TD3:=If(Ref(C,-9)<=Ref(C,-13),1,0);
TD4:=If(TD2=1 AND TD3=1,1,0);
TD5:=If(L>=Ref(HHV(H,5),-3),1,0);
D8:=If(Ref(TD4,1)=1 AND TD5=1,1,0);
D9:=If(TD4=1 AND TD5=1 AND Ref(D8,-1)<>1,1,0);
D10:=If(Ref(TD4,-1)=1 AND TD5=1 AND Ref(D8,-2)<>1 AND Ref(D9,-1)
<>1,1,0);
D11:=If(Ref(TD4,-2)=1 AND TD5=1 AND Ref(D8,-3)<>1 AND Ref(D9,-2)<>1
AND Ref(D10,-1)<>1,1,0);
D12:=If(Ref(TD4,-3)=1 AND TD5=1 AND Ref(D8,-4)<>1 AND Ref(D9,-3)<>1
AND
Ref(D10,-2)<>1 AND Ref(D11,-1)<>1,1,0);
D13:=If(Ref(TD4,-4)=1 AND TD5=1 AND Ref(D8,-5)<>1 AND Ref(D9,-4)<>1
AND
Ref(D10,-3)<>1 AND Ref(D11,-2)<>1 AND Ref(D12,-1)<>1,1,0);
D14:=If(Ref(TD4,-5)=1 AND TD5=1 AND Ref(D8,-6)<>1 AND Ref(D9,-5)<>1
AND
Ref(D10,-4)<>1 AND Ref(D11,-3)<>1 AND Ref(D12,-2)<>1 AND Ref(D13,-1)
<>1,1,0);
D15:=If(Ref(TD4,-6)=1 AND TD5=1 AND Ref(D8,-7)<>1 AND Ref(D9,-6)<>1
AND
Ref(D10,-5)<>1 AND Ref(D11,-4)<>1 AND Ref(D12,-3)<>1 AND
Ref(D13,-2)<>1 AND Ref(D14,-1)<>1,1,0);
D16:=If(Ref(TD4,-7)=1 AND TD5=1 AND Ref(D8,-8)<>1 AND Ref(D9,-7)<>1
AND
Ref(D10,-6)<>1 AND Ref(D11,-5)<>1 AND Ref(D12,-4)<>1 AND Ref(D13,-3)
<>1 AND
Ref(D14,-2)<>1 AND Ref(D15,-1)<>1,1,0);
D17:=If(Ref(TD4,-8)=1 AND TD5=1 AND Ref(D8,-9)<>1 AND Ref(D9,-8)<>1
AND
Ref(D10,-7)<>1 AND Ref(D11,-6)<>1 AND Ref(D12,-5)<>1 AND Ref(D13,-4)
<>1 AND
Ref(D14,-3)<>1 AND Ref(D15,-2)<>1 AND Ref(D16,-1)<>1,1,0);
SetUp:=D8+D9+D10+D11+D12+D13+D14+D15+D16+D17;
SetUp
TD Count Down Sell A
Cum(If(C>Ref(C,-2),1,0))-ValueWhen(1,Ref( Fml( "TD - SetUp-Sell" ),
1)=1, Cum(If(C>Ref(C,-2),1,0)))
TD Count Down Sell B
If(Fml( "TD Count Down Sell A" )>=14 AND C<Ref(C,-4),1,0)
TD Count Down Sell C
If(Fml( "TD Count Down Sell A" )>=14 AND C<Ref(H,-2),1,0)
Sell Experts :
Type / Change in Highlights:
Sell Bearish Setup
{Color: Cyan}
Fml( "TD - SetUp-Sell" ) =1 OR
Ref( Fml( "TD - SetUp-Sell" ) ,1)=1 OR
Ref( Fml( "TD - SetUp-Sell" ) ,2)=1 OR
Ref( Fml( "TD - SetUp-Sell" ) ,3)=1 OR
Ref( Fml( "TD - SetUp-Sell" ) ,4)=1 OR
Ref( Fml( "TD - SetUp-Sell" ) ,5)=1 OR
Ref( Fml( "TD - SetUp-Sell" ) ,6)=1 OR
Ref( Fml( "TD - SetUp-Sell" ) ,7)=1 OR
Ref( Fml( "TD - SetUp-Sell" ) ,8)=1
Sell Count Down
{Color: Blue}
( Fml( "TD Count Down Sell A" ) =13
AND Ref( Fml( "TD Count Down Sell A" ) ,-1 )<> 13) OR
( Fml("TD Count Down Sell A" ) =12
AND Ref( Fml( "TD Count Down Sell A" ) ,-1 )<> 12) OR
( Fml("TD Count Down Sell A" ) =11
AND Ref( Fml( "TD Count Down Sell A" ) ,-1 )<> 11) OR
( Fml("TD Count Down Sell A" ) =10
AND Ref( Fml( "TD Count Down Sell A" ) ,-1 )<> 10) OR
( Fml("TD Count Down Sell A" ) =9
AND Ref( Fml( "TD Count Down Sell A" ) ,-1 )<> 9) OR
( Fml( "TD Count Down Sell A" ) =8
AND Ref( Fml( "TD Count Down Sell A" ) ,-1 )<> 8) OR
( Fml( "TD Count Down Sell A" ) =7
AND Ref( Fml( "TD Count Down Sell A" ) ,-1 )<> 7) OR
( Fml( "TD Count Down Sell A" ) =6
AND Ref( Fml( "TD Count Down Sell A" ) ,-1 )<> 6) OR
( Fml( "TD Count Down Sell A" ) =5
AND Ref( Fml( "TD Count Down Sell A" ) ,-1 )<> 5) OR
( Fml( "TD Count Down Sell A" ) =4
AND Ref( Fml( "TD Count Down Sell A" ) ,-1 )<> 4) OR
( Fml( "TD Count Down Sell A" ) =3
AND Ref( Fml( "TD Count Down Sell A" ) ,-1 )<> 3) OR
( Fml( "TD Count Down Sell A" ) =2
AND Ref( Fml( "TD Count Down Sell A" ) ,-1 )<> 2)
Sell A
{Color: Green}
( Fml( "TD Count Down Sell A" ) =14
AND Ref( Fml( "TD Count Down Sell A" ) ,-1 )<> 14)
Sell B
{Color: Green}
A:=If( Fml( "TD Count Down Sell A" ) =14
AND Ref( Fml( "TD Count Down Sell A" ) ,-1 )<> 14,1,0);
B:=If( Ref(Fml( "TD Count Down Sell B" ),-1) =1,1,0);
HighestSinceBars(1,A =1,A )<HighestSinceBars(1,B=1,B ) AND Fml( "TD
Count Down Sell B" ) =1
Sell C
{Color: Green}
A:=If( Fml( "TD Count Down Sell A" ) =14
AND Ref( Fml( "TD Count Down Sell A" ) ,-1 )<> 14,1,0);
B:=If( Ref(Fml( "TD Count Down Sell C" ),-1) =1,1,0);
HighestSinceBars(1,A =1,A )<HighestSinceBars(1,B=1,C ) AND Fml( "TD
Count Down Sell C" ) =1
Type / Change in Symbols:
SetUp9
{Label: 9 / Font: 8 / Color: Magenta / Position: Above / Graphics:
None}
Fml( "TD - SetUp-Sell" )=1
SetUp8
{Label: 8 / Font: 8 / Color: Magenta / Position: Above/ Graphics:
None}
Ref( Fml( "TD - SetUp-Sell" ),1)=1
SetUp7
{Label: 7 / Font: 8 / Color: Magenta / Position: Above/ Graphics:
None}
Ref( Fml( "TD - SetUp-Sell" ),2)=1
SetUp6
{Label: 6 / Font: 8 / Color: Magenta / Position: Above/ Graphics:
None}
Ref( Fml( "TD - SetUp-Sell" ),3)=1
SetUp5
{Label: 5 / Font: 8 / Color: Magenta / Position: Above/ Graphics:
None}
Ref( Fml( "TD - SetUp-Sell" ),4)=1
SetUp4
{Label: 4 / Font: 8 / Color: Magenta / Position: Above/ Graphics:
None}
Ref( Fml( "TD - SetUp-Sell" ),5)=1
SetUp3
{Label: 3 / Font: 8 / Color: Magenta / Position: Above/ Graphics:
None}
Ref( Fml( "TD - SetUp-Sell" ),6)=1
SetUp2
{Label: 2 / Font: 8 / Color: Magenta / Position: Above/ Graphics:
None}
Ref( Fml( "TD - SetUp-Sell" ),7)=1
SetUp1
{Label: 1 / Font: 8 / Color: Magenta / Position: Above/ Graphics:
None}
Ref( Fml( "TD - SetUp-Sell" ),8)=1
CountDown1
{Label: 1 / Font: 8 / Color: Brown / Position: Above / Graphics:
None}
Fml( "TD Count Down Sell A" ) =2
AND Ref( Fml( "TD Count Down Sell A" ) ,-1 )<>2
CountDown2
{Label: 2 / Font: 8 / Color: Brown / Position: Above / Graphics:
None}
Fml( "TD Count Down Sell A" ) =3
AND Ref( Fml( "TD Count Down Sell A" ) ,-1 )<>3
CountDown3
{Label: 3 / Font: 8 / Color: Brown / Position: Above / Graphics:
None}
Fml( "TD Count Down Sell A" ) =4
AND Ref( Fml( "TD Count Down Sell A" ) ,-1 )<>4
CountDown4
{Label: 4 / Font: 8 / Color: Brown / Position: Above / Graphics:
None}
Fml( "TD Count Down Sell A" ) =5
AND Ref( Fml( "TD Count Down Sell A" ) ,-1 )<>5
CountDown5
{Label: 5 / Font: 8 / Color: Brown / Position: Above / Graphics:
None}
Fml( "TD Count Down Sell A" ) =6
AND Ref( Fml( "TD Count Down Sell A" ) ,-1 )<>6
CountDown6
{Label: 6 / Font: 8 / Color: Brown / Position: Above / Graphics:
None}
Fml( "TD Count Down Sell A" ) =7
AND Ref( Fml( "TD Count Down Sell A" ) ,-1 )<>7
CountDown7
{Label: 7 / Font: 8 / Color: Brown / Position: Above / Graphics:
None}
Fml( "TD Count Down Sell A" ) =8
AND Ref( Fml( "TD Count Down Sell A" ) ,-1 )<>8
CountDown8
{Label: 8 / Font: 8 / Color: Brown / Position: Above / Graphics:
None}
Fml( "TD Count Down Sell A" ) =9
AND Ref( Fml( "TD Count Down Sell A" ) ,-1 )<>9
CountDown9
{Label: 9 / Font: 8 / Color: Brown / Position: Above / Graphics:
None}
Fml( "TD Count Down Sell A" ) =10
AND Ref( Fml( "TD Count Down Sell A" ) ,-1 )<>10
CountDown10
{Label: 10 / Font: 8 / Color: Brown / Position: Above / Graphics:
None}
Fml( "TD Count Down Sell A" ) =11
AND Ref( Fml( "TD Count Down Sell A" ) ,-1 )<>11
CountDown11
{Label: 11/ Font: 8 / Color: Brown / Position: Above / Graphics:
None}
Fml( "TD Count Down Sell A" ) =12
AND Ref( Fml( "TD Count Down Sell A" ) ,-1 )<>12
CountDown12
{Label: 12 / Font: 8 / Color: Brown / Position: Above / Graphics:
None}
Fml( "TD Count Down Sell A" ) =13
AND Ref( Fml( "TD Count Down Sell A" ) ,-1 )<>13
CountDown13
Sell A
{Label: Sell A / Font: 9 / Color: Red / Position:Above / Graphics:
Sell Arrow }
Fml( "TD Count Down Sell A" ) =14
AND Ref( Fml( "TD Count Down Sell A" ) ,-1 )<>14
Sell B
{Label: Sell B / Font: 9 / Color: Red / Position: Above / Graphics:
Sell Arrow}
A:=If( Fml( "TD Count Down Sell A" ) =14
AND Ref( Fml( "TD Count Down Sell A" ) ,-1 )<> 14,1,0);
B:=If( Ref(Fml( "TD Count Down Sell B" ),-1) =1,1,0);
HighestSinceBars(1,A =1,A )<HighestSinceBars(1,B=1,B ) AND
Fml( "TD Count Down Sell B" ) =1
Sell C
{Label: Sell C / Font: 9 / Color: Red / Position: Above /
Graphics:Sell Arrow}
A:=If( Fml( "TD Count Down Sell A" ) =14
AND Ref( Fml( "TD Count Down Sell A" ) ,-1 )<> 14,1,0);
B:=If( Ref(Fml( "TD Count Down Sell C" ),-1) =1,1,0);
HighestSinceBars(1,A =1,A )<HighestSinceBars(1,B=1,C ) AND Fml( "TD
Count Down Sell C" ) =1
======code end=======
----------------------------------------------------------
-----------
Thomas DeMark's Sequential (tm) System
Basically the criteria are as enumerated below, however, to
appreciate the rational and nuances you are urged to read Ch. 7 of
his book. The systemis divided into three distinct stages, A. Set
up, B. Count Down, and C. Entry.
A. Set Up Criteria
1. For a Buy signal. Nine consecutive daily price closes which are
lowerthan the close four days earlier.
For a Sell signal. Nine consecutive daily price closes which are
higher than the closes four days earlier.
2. An Absolute Prerequisite
The day prior to the first day of a nine consecutive set up sequence
must:
for a buy signal have a close higher than or equal to the close four
days earlier,
for a sell signal have a close lower than or equal to the close four
days earlier.
B. Count Down
For a buy signal, following the successful completion of the count
down we wait for thirteen closes which are lower than the close two
days earlier(not consecutive, in fact extremely unlikely to be so).
For a sell signal, after successful set up, wait for thirteen closes
which are higher than the close two days earlier.
C. Entry
On successful completion of set up and count down we now have a
choice:
a) Enter on the close of the day that the count down is completed,
i.e. the close of the thirteenth defined close. This is the most
aggressive and highest risk entry but most closely approximates the
exact high or low of the trend about to be reversed. However, it is
the entry most likely to be whipsawed if the Sequential fails.
Entry after reversal
b) On a close higher for a buy (lower for a sell) than a close four
daysearlier after the count down has been concluded, i.e. post
reversal.
c) On a close higher for a buy (lower for a sell) than the high
(low) two days earlier after conclusion of the count down, i.e. a
compromise between a) and b).
=======