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

Re: DeMark



PureBytes Links

Trading Reference Links

I have coded in the past the tom demark sequential for long, but 
after backtesting it was not good

MaxGraph=14;
/********Optimize***********/
Opt1=9;
Opt2=13;


/*********Setup Buy*********/

TD1=IIf(Close<Ref(Close,-4),1,0); 
TD2=IIf(BarsSince(BarsSince(TD1))==Opt1, 1,0); 
TD3= H>=Ref(LLV(L,BarsSince(BarsSince(TD1))),-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= L<=Ref(HHV(H,BarsSince(BarsSince(TD1))),-1);
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)+1);

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

/***********A***********/
B1= CountBuy >=Opt2; 
B1= Hold(B1==0,2) AND B1;
Sell= SetUpsell;
Buy= SetUpbuy;

Ccount=IIf(B1,ValueWhen(B1,HHV(C,BarsSince(Buy))),0);
Hsetup=IIf(B1,ValueWhen(Buy,HHV(H,Opt1)),0);

BuyA=B1 AND (HighestSinceBars(Buy,Buy)<
HighestSinceBars(Sell,Sell)) AND
Hsetup > Ccount;

/******B**********/
B1= CountBuy >=Opt2; 
B2= CountBuy >Opt2 AND Close > Ref(Close,-4);

Ccount=IIf(B1,ValueWhen(B1,HHV(C,BarsSince(Buy))),0);
Hsetup=IIf(B1,ValueWhen(Buy,HHV(H,Opt1)),0);

B1=Hold(B1==0,2) AND B1;
B2=Hold(B2==0,2) AND B2;

BuyB=ExRem(B2,B1) AND
(HighestSinceBars(Buy,Buy)<
HighestSinceBars(Sell,Sell)) AND
Hsetup > Ccount;

/*************C***********/
B1= CountBuy >=Opt2; 
B3= CountBuy >Opt2 AND Close > Ref(High,-2);

Ccount=IIf(B1,ValueWhen(B1,HHV(C,BarsSince(Buy))),0);
Hsetup=IIf(B1,ValueWhen(Buy,HHV(H,Opt1)),0);

B1= Hold(B1==0,2) AND B1;
B3= Hold(B3==0,2) AND B3;

BuyC= ExRem(B3,B1) AND
(HighestSinceBars(Buy,Buy)<
HighestSinceBars(Sell,Sell)) AND
Hsetup > Ccount;

/***********D************/
B1= CountBuy >=Opt2; 
B4= CountBuy >Opt2 AND Close>Open AND (C-O) > ((H-C)+(O-L)) ;

Ccount= IIf(B1,ValueWhen(B1,HHV(C,BarsSince(Buy))),0);
Hsetup=IIf(B1,ValueWhen(Buy,HHV(H,Opt1)),0);

B1=Hold(B1==0,2) AND B1;
B4=Hold(B4==0,2) AND B4;

BuyD= ExRem(B4,B1) AND
(HighestSinceBars(Buy,Buy)<
HighestSinceBars(Sell,Sell)) AND
Hsetup > Ccount;

/************Buy Signal********/

Buy=(BuyB OR BuyC OR BuyD) ;
Plot(C,"",IIf(Buy,5,1),64);
Plot(Buy*C,"",2,2);


/* 
1 noir
2 white
3 blue pale
4 red
5 Vert
6 blue
7 jaune
8 Vert
9 Orange
11 Mauve
/***************end****************/
> Has anyone read Tom DeMark's Books or used his trend exhaustion 
indicators (TD Sequential & TD Combo) ?
> 
> I read a interesting article in July's Active Trader.
> 
> Thanks in Advance,
> Brian






  • References: