Skip to main content

Chande's Trend Score for Amibroker (AFL)

kaiji over 16 years ago Amibroker (AFL)

  • Rating:
    5 / 5 (Votes 1)
  • Tags:
    oscillator, amibroker

This is the Chande’s Trend Score for Amibroker.

Indicator / Formula

Copy & Paste Friendly
SmoothingPeriod = 5;

CTS=IIf(C>=Ref(C,-11),1,-1)+IIf(C>=Ref(C,-12),1,-1)+IIf(C>=Ref(C,-13),1,-1)+IIf(C>=Ref(C,-14),1,-1)+IIf(C>=Ref(C,-15),1,-1)+IIf(C>=Ref(C,-16),1,-1)+IIf(C>=Ref(C,-17),1,-1)+IIf(C>=Ref(C,-18),1,-1)+IIf(C>=Ref(C,-19),1,-1)+IIf(C>=Ref(C,-20),1,-1);

CTSM = WMA(CTS,SmoothingPeriod);
Histo = IIf(CTSM==10,5,IIf(CTS==-10,-5,Null)); 

Plot(CTSM, "CTSM", colorBlack, styleLine );
Plot(Histo, "", colorGreen, styleHistogram );

Plot(12,"",colorRed,styleLine);
Plot(-12,"",colorRed,styleLine);

2 comments

2. morgen
about 15 years ago

Try here:
http://stockstudent.blogspot.com/2008/03/yangzijiang-trend-score-case-study.html

Leave Comment

Please login here to leave a comment.