Trend Score for Amibroker (AFL)
haifx over 13 years ago Amibroker (AFL)
The strength of the trend. Code created by vole_00 srsc.
Indicator / Formula
Copy & Paste Friendly
CTS=IIf(C>=Ref(C,-5),1,-1)+
IIf(C>=Ref(C,-6),1,-1)+
IIf(C>=Ref(C,-7),1,-1)+
IIf(C>=Ref(C,-8),1,-1)+
IIf(C>=Ref(C,-9),1,-1)+
IIf(C>=Ref(C,-10),1,-1)+
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);
Plot(CTS, "CTS", colorBlack, styleLine );
Plot(12,"",colorRed,styleLine);
Plot(0,"",colorBlue,styleLine);
Plot(-12,"",colorRed,styleLine);
EntryLong = CTS>=5 AND Ref(CTS,-1)<5;
ExitLong = CTS<0;
Buy = EntryLong;
Sell = ExitLong;
PlotShapes(IIf(Buy ==1, shapeUpArrow , shapeNone), colorGreen, 0,CTS, Offset=-15);
PlotShapes(IIf(Sell ==1, shapeDownArrow, shapeNone), colorRed, 0,CTS, Offset=-15);6 comments
Leave Comment
Please login here to leave a comment.
Good for trending market. Not good for rangebound situations.
thanks lot for nice contribution..
THANKS A LOT
Nice indicator especially in weekly time frame
@haifx,
Can we make some modification like this….?
‘ExitLong=CTS<=5 AND Ref(CTS,-1)>5;
Buy = EntryLong;
Sell = ExitLong;
Buy=ExRem(EntryLong,ExitLong);
Sell=ExRem(ExitLong,EntryLong);’
this is queat batter for Daily TF…..
anandst,Vishwanath sir,Sir what is your opinion for Daily TF…?
how to use this