Thomas DeMark Sequential System

hello everybody,
I want to test and trade sequential system. can somebody plz post metastock coding for it. i think coding is availabe for amibroker only in this fourm or i am missing something?
regards
arvind
Hello Arvind,

I suggest you understand the system,all its qualifiers,critaria etc.Then paper trade on daily or hrly timeframes.then start trading the components like power of 9,TDST etc and then go for Sequential or Combo systems.Dont get bogged down with the AFL part of it.AFL just eases a trader's work but it can never replace the trading skills and system knowledge which a trader must have.If AFL could replace trading skills,all programmers would be expert traders!!!

I am sure you will succeed in learning and trading the system (with or without coding it).

Best Wishes,Trade well !!!


Smart_trade
 
Last edited:
apurva sir, ken sir, smart trade sir..plz check the following AFL... is this afl ok ..

_SECTION_BEGIN("TD Sequential");
GraphXSpace =10;



Compress= Param("Compress",1,1,100,1);
TimeFrameSet(Compress* Interval());



/*TD seq long et short side full version*/

/********Optimize***********/
Opt1=Param("Opt1",9,5,21,1);
Opt2=Param("Opt2",13,1,21,1);

/*********Setup Buy*********/
TD1=IIf(Close<Ref(Close,-4),1,0);
TD2=IIf(BarsSince(BarsSince(TD1))==Opt1, 1,0); //Sum(TD1,9)==9;
TD3= Ref(H,-1)>=Ref(LLV(L,Opt1-4),-3);
TD4= Ref(C,-Opt1)>=Ref(C,-Opt2);
SetupBuy= TD3 AND TD2 AND TD4;

/***********SetupSell************/
TD1=IIf(Close>Ref(Close,-4),1,0);
TD2=IIf(BarsSince(BarsSince(TD1))==Opt1, 1,0);
TD3= Ref(L,-1)<=Ref(HHV(H,Opt1-4),-3);
TD4= Ref(C,-Opt1)<=Ref(C,-Opt2);
SetupSell= TD3 AND TD2 AND TD4 ;

/*********Count Buy ********/
CountBuy= Sum(IIf(C<Ref(C,-2),1,0),BarsSince(SetupBuy));
//or C<Ref(H,-2)

/*********Count Sell ********/
CountSell= Sum(IIf(C>Ref(C,-2),1,0),BarsSince(SetupSell));
//or C>Ref(L,-2)

/***********A***********/
B1= CountBuy >=Opt2;
B1= Hold(B1==0,2) AND B1;
Timing=(BarsSince(SetUpbuy)< BarsSince(SetUpsell));
Ccount=IIf(CountBuy >=Opt2,ValueWhen(B1,HHV(C,BarsSince(SetupBuy))),Null);
Hsetup=IIf(CountBuy >=Opt2,ValueWhen(SetupBuy,HHV(H,Opt1)),Null);
BuyA=B1 AND Timing AND Hsetup > Ccount;

/******B**********/
B2= CountBuy >Opt2 AND Close > Ref(Close,-4);
B2=Hold(B2==0,2) AND B2;
B2=ExRem(B2,B1);
BuyB=B2 AND Timing AND Hsetup > Ccount;

/*************C***********/
B3= CountBuy >Opt2 AND Close > Ref(High,-2);
B3= Hold(B3==0,2) AND B3;
B3=ExRem(B3,B1);
BuyC= B3 AND Timing AND Hsetup > Ccount;

/************Buy Signal********/
Buy=BuyB OR BuyC ;

////////////////////////////////
//SHORT
/////////////////////////////////

/***********A***********/
S1= CountSell >=Opt2;
S1= Hold(S1==0,2) AND S1;
Timing=(BarsSince(SetUpSell)< BarsSince(SetUpbuy));
Ccount=IIf(CountSell >=Opt2,ValueWhen(S1,LLV(C,BarsSince(SetupSell))),Null);
Lsetup=IIf(CountSell >=Opt2,ValueWhen(SetupSell,LLV(L,Opt1)),Null);
SellA=S1 AND Timing AND Lsetup < Ccount;

/******B**********/
S2= CountSell >Opt2 AND Close < Ref(Close,-4);
S2=Hold(S2==0,2) AND S2;
S2=ExRem(S2,S1);
SellB=S2 AND Timing AND Lsetup < Ccount;

/*************C***********/
S3= CountSell >Opt2 AND Close < Ref(Low,-2);
S3= Hold(S3==0,2) AND S3;
S3=ExRem(S3,S1);
SellC= S3 AND Timing AND Lsetup < Ccount;

/***********Short Signal********/
Short= SellB OR SellC ;
StyleList= ParamList("Chart Style", "Bar,Candle");
style =IIf(StyleList== "Bar", styleBar,styleCandle);

PlotShapes(IIf(Short,
shapeDownArrow,shapeNone),colorRed,0,H,-10);
PlotShapes(IIf(Buy,
shapeUpArrow,shapeNone),colorBrightGreen,0,L,-10);

PlotShapes(IIf(SetupSell,
shapeDigit9,shapeNone),colorRed,0,H,10);
PlotShapes(IIf(SetupBuy,
shapeDigit9,shapeNone),colorGreen,0,L,-10);

Color= IIf(SetupSell OR SetupBuy,colorYellow,
IIf(Buy, colorBrightGreen,
IIf(Short,colorRed, 39)));
Plot(C,"",color,style);


Title = Name() +" ("+ FullName()+ ")" +" TD Sequential"+"\n"+
"Timeframe: " + Interval(2) +"\n"+
Date() +"\n"
;
_SECTION_END();
 

kenneth

Well-Known Member
Hi Ken,

Countdown conditions listed by you are correct.I would add the following :

1) Countdown cannot start before 9 bars of Set up are completed.In other words the first countdown bar at earliest will be at 9th set up bar provided the intersection is done in 9th,8th or 7 th bar of set up.If not the countdown is started after the intersection happens.Note this happening in RPower graph I posted few posts back.Here intersection happened after 9 bars of setup and hence the countdown starting was delayed.

2) Recycling means that before 13 countdown gets over,a second set up developes in the same direction.Then the question is we have the countdown on the old set up or the new set up ? The answer is measure the pointwise distance travelled by both set ups.( here the distance is not upto 1st to 9 th bar of set up but setup continues till you get a flip ie set up it could be in 10th,11th 12 or sebsequent bars.

Now the rule is if the second set up length (pointwise distance travelled) is more than 1 st set up but less than 1.618 of the first set up ,then ignore 1st set up and start countdown on 2nd set up and if the length of 2nd set up is less than length of 1st set up or more than 1.618 of 1st set up then ignore second set up and continue the count down on 1st set up only .

Little confusing and complex ? Well would try to explain with a chart and marking on it after the mkt hours.

Best Wishes and Trade well !!!!

Smart_trade

Thanks Smart Trader. Very well explained. Waiting for your explanation with charts for distance travelled.

Once more clarification is required for countdown. You get your 13th day after 4 days of set up if the 4 day if each day is lower than close of 2 days earlier. Where as per the statement it should continue for 13 days. Please clarify.

Regards
Ken
 
Posting Sequential Sell signal on Sesa Goa.The chart is EOD chart.The set up bars are marked in blue and countdown by red.Note that the 13 countdown day is on "terminal count" critaria.The sell signal is on 2-6-2008 catchinh exact intraday highest bar.

http://img166.imageshack.us/img166/4425/sesasellseqxt9.jpg

I have not marked(as it was out of range) but recently there is a buy set up completed on daily chart and the TDST is proving to be a formidable resistance to all upmoves in Sesa. Till this TDST is broken,Sesa will be bearish !!!

Best Wishes,Trade well !!!

Smart_trade
 
Thanks Smart Trader. Very well explained. Waiting for your explanation with charts for distance travelled.

Once more clarification is required for countdown. You get your 13th day after 4 days of set up if the 4 day if each day is lower than close of 2 days earlier. Where as per the statement it should continue for 13 days. Please clarify.

Regards
Ken
Ken,Are you referring to Bombay Dyeing chart? In that case see that the first set up is larger than the second.So the countdown to be done on 1st set up.Thus the second set up is not relevent for count down process.

I have made an error and my 13 th bar is missing the low by just 1/- in that case I refer to BSE prices.But otherwise BombayDyeing has all variations one can learn.

I have to mark all these bars manually and hence quite tedious job but will post soon.It is a good case study to learn various finer points of Sequential.

Best Wishes,Trade well!!!

Smart_trade
 

kenneth

Well-Known Member
Thnaks Smart Trader. What I see on Sesa chart that Sell signal was active for 12 days On 2-6-2008. In addition yesterday Buy signal is active for 14 days and today is again 9 day buy setup. The first set up distance is 12 points and and the today's is 20 points. Please see if he distan ceis correct and if it quaalifies for cycling.

Could you please also check the TDST buy level.

Regards
Ken
 

kenneth

Well-Known Member
For a sell (buy) setup the countdown reflects the relationship between the close and the high (low) two bars earlier. The closing price must be greater (less) than the high (low) two bars earlier. As soon as 13 such prices are recorded (not necessarily consecutive) said:
I wanted to know about this statement in My earlier post which is from a TD site.

Regards
Ken
 
Thnaks Smart Trader. What I see on Sesa chart that Sell signal was active for 12 days On 2-6-2008. In addition yesterday Buy signal is active for 14 days and today is again 9 day buy setup. The first set up distance is 12 points and and the today's is 20 points. Please see if he distan ceis correct and if it quaalifies for cycling.

Could you please also check the TDST buy level.

Regards
Ken
Ken,
Don't say Sell signal was active for 12 days,say that the set up and countdoen process continued and the 12 th countdown(CD) bar was on 2-6-08 and 13 th was qualified on Terminal Count on 3-6-og giving a SELL signal.It is the counting process that leads to sell signal.

Smart Trade
 

kenneth

Well-Known Member
The above AFl gave a buy on IGL at 121 on 25th aug
not many recognised stocks on the buy list..will update if there are any
You can check these too

Code:
Ticker	Trade	Date	Close	
CHEMPLAST	Buy	8/27/2008	7.4000
FORTIS	Buy	8/27/2008	73.0500
IGL	Buy	8/27/2008	115.0000
JINDALPHOTBuy	8/27/2008	146.6500
Regards
ken
 

Similar threads