You are on page 1of 6

Thomas Demark Indicators

“Indicator Builder” fx in Metastock


TD – SetUp-Buy: calculates SetUp number (if = 13, then draws spiked line) and draws line,
if it is integrated into chart: not necessary as the formula is used in
Expert.

TD Count Down Buy A: calculates number of the Count Down bar. Refers to “TD – SetUp-
Buy”

TD Count Down Buy B: calculates entry point 1. Refers to “TD Count Down Buy A”

TD Count Down Buy C: calculates entry point 2. Refers to “TD Count Down Buy A”

“Expert Advisor” in Metastock


TD test (or whatever):

Highlights These are formulas and settings for colouring bars

Buy Bullish SetUP refers to “TD – SetUp-Buy”

Buy Count Down refers to “TD Count Down Buy A”

Buy A refers to “TD Count Down Buy A”

Buy B refers to “TD Count Down Buy A” & to “TD Count Down Buy
B”

Buy C refers to “TD Count Down Buy A” & to “TD Count Down Buy
C”

Symbols These are formulas and settings for adding text and symbols
(arrows, etc) to bars.

Used for the Count Down bars and numbering bars and for Buy
B and Buy C.

Formulas:

Fml(“TD COUNT DOWN BUY A”) = 13 completion of SetUp

If(C < ref(C, -4), 1, 0) SetUp bar

If(C < ref(C, -2), 1, 0) Count Down bar


Buy Indicators: Sequential & Combo

-14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 1 2 3 4 5 6

o o o o o o o o o o o o o o o o o o o o

1 2 3 4 5 6 7 8 9 10 11 12 13 14

1) TD - SetUp-Buy in “Indicator Builder”

A completed “buy” SetUp is defined as a series of 9 consecutive pricebars where the close of each bar <
close 4 bars earlier. The series of consecutive closes may continue, but only the first 9 are required.

TD1:=If (C<Ref(C,-4),1,0);

SetUp conditions:

SetUp is confirmed if TD2 = 1, plus the precondition for setup = 1

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);

Precondition for SetUp:

A “price flip” (a change in direction) must have occurred. The 1st day of the SetUp must be preceded by a
close on the trading day immediately before itself that is >= close 4 bars earlier.

TD3:=If (Ref(C,-9)>=Ref(C,-13),1,0);

The following confirms the SetUp requirements for the 1st bar :

TD4:=If (TD2=1 AND TD3=1,1,0); .

In order not to be caught by a run-away trend, we need SetUp qualifications…

2) Intersection

To prevent premature market entry. Does not apply to indices, and has limited application…. It does NOT
apply to Combo

Price range of bar 8 or 9 of SetUp >= low of bar 3, 4, 5, 6, or 7 bars earlier (i.e. sequence of 5 bars).

TD5:=If(H>=Ref(LLV(L,5),-3),1,0); LLV(data array, periods) calculates the lowest value in the data array
over the preceding periods including current day.

Confirmation that SetUp is valid:


D8:=If(Ref(TD4,1)=1 AND TD5=1,1,0);

D8 = 1 is the confirmation that Setup sequence calculation can start.

Calculating SetUp

D9:=If(TD4=1 AND TD5=1 AND Ref(D8,-1)<>1,1,0);

The following seems to test that only the first 9 bars of SetUp are validated

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 ANDRef(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;

If the SetUp indicator is used then a red line spikes to 1 on bar 9 of a validated SetUp.

SetUp this is the instruction to set up the red line. The SetUp may need to be confirmed by the
“Intersection”.

TD Termination Count:

Close < low, -2 or open < low, -2 or low < low, -2

Countdown qualifier: in order to complete Countdown for Sequential

Countdown 13 < close countdown 8


______________________________________________________________________________

The next step would be the CountDown, however, we now need an indicator of whether the market will
reverse the trend on completion of SetUp or will proceed to the 13 count DownCount.

TD Setup Trend – TDST can be applied to Combo

It is a horizontal line which forms a price-level. If price closes above and then opens above and trades at
least 1 tick higher, it suggests that the trend is strong, until a sell SetUp is recorded. It will not proceed to a
13 count Countdown.

3) TD - Countdown

“ TD Count Down Buy A” in “Indicator Editor” for Sequential: calculate the number of correct Count Downs

( ) (
Cum If(C<Ref(C,-2),1,0) –ValueWhen 1,Ref (Fml("TD - SetUp-Buy" ), 1)=1, Cum(If(C<Ref(C,-2),1,0)) )
ValueWhen returns the value of the DATA ARRAY when the EXPRESSION was true on the N th most
recent occurrence. ValueWhen (Nth , EXPRESSION, DATA ARRAY).

As soon as SetUp is confirmed (=1)then the calculation for Count Down starts i.e. cumulate all correct Count
Downs since start of data minus all cumulative Count Downs up to the point when SetUp is completed.

ENTRY for Sequential (old book “The new science of Technical Analysis”) once 13 Count Downs achieved,
then look for Entry:

1) next day
2) 14th or subsequent day with C>C, -4 (signal Buy B)

3) 14th or subsequent day with C>H, -2 (signal Buy C)

Entry TD Count Down Buy B for Sequential

If(Fml("TD Count Down Buy A")>=14 AND C>Ref(C,-4),1,0) Entry signal Buy B

Entry TD Count Down Buy C for Sequential

If(Fml("TD Count Down Buy A")>=14 AND C>Ref(H,-2),1,0) ) Entry signal Buy C

………………………………………………………………………………………………………………

3) TD – Combo

SetUp is same as Sequential, except that doesn’t include Intersection phase.

1) SetUp qualifier:
(only applies to trade the completed low-risk SetUp indications)to avoid too early trading, but its absence
could indicate a run-away market. This is a warning, but does not affect Sequential, only that it may be
premature to enter the Market after a completed Setup (because there may not be a trend reversal).

Low of 7th, 8th, or 9th Buy SetUp bar must be less than low of 6th bar.

(Low, -3 (equals 6th) > low,-2 (equals 7th)) or (Low, -3 > low,-1 (equals 8th)) or (Low, -3 > low,1
(equals 9th)) this could be used in Expert Opinion or Symbols

2) Recycling qualifier:

when two or more consecutive SetUps are recorded (in same direction)

3) SetUp cancellations: SetUp is cancelled if following:

!) Contratrend moves

2) Reverse SetUps: price flip before completion of SetUp (ie close > close, -4)

3) SetUp Recycling, determined visually

Contratrend moves: after the SetUp has been completed

(i) A high > highest close of whole buy SetUp


(ii) A high > highest high of whole buy SetUp

(iii) A close > highest close of whole buy SetUp

(iv) A close > highest high of whole buy SetUp

(v) A close > highest true high of whole buy SetUp:

(vi) A low > highest true high * the one to use

true high is the highest high of the Buy SetUp or

the close of bar prior to highest high, whichever is the greater. HHV page 248 of Metastock: HHV( H,

Highest high = Highest “true” high of the buy SetUp: i.e. the highest high 1-9 or the close of the bar just
prior to count 1, whichever is the greatest.

3 rules must be followed after SetUp and relevant conditions have been fulfilled:

Version 1 “TD Combo Countdown Buy A” is used for Highlighters and Symbols to indicate Countdown
bars

1) close <= low -2 (Sequential basis is close<close, -2 which is TD COUNT DOWN BUY A)

( ) (
variable X = Cum If(C<Ref(L,-2),1,0) –ValueWhen 1,Ref (Fml("TD Combo Setup Buy" ), 1)=1,

Cum(If(C<Ref(L,-2),1,0)) ) and

2) low < low -1 and


3) close each Countdown < close previous Countdown except for the 1st Countdown

Version 2 (preferable) of Count Down formula in “TD Countdown Buy A”

1) close <= low -2 including bar 10 and

2) low < low -1 including bar 10 and

3) close each Countdown < close previous Countdown including bar 10 (except for the 1st Countdown)

For bar 11, 12 and 13:

Close each Countdown < close previous Countdown

No qualifiers are necessary (as in the case of Sequential)

Entry indicators:

Any one of the following 4 justifies entry:

TD Open

TD Trap

TD Clop

TD Clopwin

You might also like