Skip to main content

TD Sequential setup & Ermanometry for Amibroker (AFL)

nareshpriya over 14 years ago Amibroker (AFL)

  • Rating:
    4 / 5 (Votes 5)
  • Tags:
    amibroker, trading system
INTRADAY APPLICATION OF TD SEQUENTIAL AND ERMANOMETRY

(s&c magazine – courtesy)

In “TD Sequential And Ermanometry For Intraday Traders”, author Andrew Coles presents two timing techniques. A ready-to-use TD Sequential Setup formula for AmiBroker is presented in Listing 1, and the formula for Ermanometry is presented in Listing 2. To use the formulas, enter them in the Afl editor, then press “insert indicator.” The starting point of a time series for Ermanometry can be selected either by a mouse-click or by using the parameter window to change the lengths of seed segments.

Screenshots

Indicator / Formula

Copy & Paste Friendly
_SECTION_BEGIN("TD sequential setup");
// TD Sequential Setup 
Plot( C, "Price", colorBlack, styleCandle ); 
y = ParamField("Price field"); 

Buy = Sum( y < Ref( y, -4 ), 9 ) == 9 AND Ref( y, -9) > Ref( y, -13 ); 
Sell = Sum( y > Ref( y, -4 ), 9 ) == 9 AND Ref( y, -9) < Ref( y, -13 ); 

PlotShapes( Buy * shapeUpArrow + Sell * shapeDownArrow, IIf( Buy, colorGreen, colorRed ), 0, IIf( Buy, L, H ) );
//LISTING 2
// Ermanometry 
Plot( C, "Price", colorBlack, styleCandle ); 
dt = DateTime(); 
Start = dt == SelectedValue( dt ); 

EF = Param("Seed Seg EF", 48, 1, 900 ); 
DE = Param("Seed Seg DE", 40, 1, 900 ); 

Ratio = EF/DE; 
InverseRatio = 1/Ratio; 

x = BarsSince( start ); 
CD = DE * Inverseratio; 
BC = CD * Inverseratio; 
AB = BC * Inverseratio; 
FG = EF* Ratio; 
GH = FG * Ratio; 
HI = GH * Ratio; 
IJ = HI * Ratio; 

FH = sqrt( FG * FG  + GH * GH  ); 

Erman = 
x == int(FH) OR /* Erman */ 
x == int(GH) OR /* Erman */ 
x == int(HI) OR /* Erman */ 
x == int(IJ) OR /* Erman */ 
x == int(DE+EF+CD) OR /* Erman */ 
x == int(GH+HI+IJ) OR /* Erman */ 
x == int(CD+DE+EF+FG+GH+HI) OR /* Erman */ 
x == int(EF+FG+GH) OR /* Erman */ 
x == int(CD+DE+EF+FG+GH) OR /* Erman */ 
x == int(CD+DE+EF+FG+GH+HI) OR /* Erman */ 
x == int(GH+IJ+CD+AB+EF); /* Erman */ 

Plot( Erman, "Erman", colorRed, styleHistogram | styleOwnScale ); 

FH = sqrt( FG * FG  + GH * GH  ); 

Coles = 
x == int(FH+FG+GH) OR /* Coles */ 
x == int(AB+BC+CD+DE) OR /* Coles */ 
x == int(AB+BC+CD+DE+GH) OR /* Coles */ 
x == int(FG+GH) OR /* Coles */ 
x == int(GH+HI) OR /* Coles */ 
x == int(FG+BC+CD) OR /* Coles */ 
x == int(FG+BC+CD+DE) OR /* Coles */ 
x == int(CD+BC) OR /* Coles */ 
x == int(DE+BC) OR /* Coles */ 
x == int(sqrt(CD*CD+DE*DE)+CD+DE) OR /* Coles */ 
x == int(sqrt(EF*EF+FG*FG)+EF+FG); /* Coles */ 

Plot( Coles, "Coles", colorGreen, styleHistogram | styleOwnScale );


_SECTION_END();

2 comments

2. sam21
over 14 years ago

Thanks for correcting the error…which is still there in traders.com

GOD BLESS YOU

Leave Comment

Please login here to leave a comment.