- Katılım
- 23 Eki 2020
- Mesajlar
- 1,826
CCT Kaleidoscope for Amibroker (AFL)
“The CCT Kaleidoscope is an interesting combination of three separate momentum oscillators. I’ve combined the MetaStock LinRegSlope indicator with the Stochastic Momentum Indicator and added the True Strength Index. As always, I have “tweaked” the formula numbers to various fibonacci numbers and assigned various weights to each of the parts. The SMI is a “double-smoothed stochastic” introduced by William Blau. Mr. Blau also has written about the True Strength Index, which in his words is a “cross between a relative strength indicator and a moving average convergence/divergence indicator with many of the desirable properties from each”. The combination of the three is a super powerful tool I call the Kaleidoscope."
Kod:
// Downloaded From https://www.WiseStockTrader.com
/* CCT Kaleidoscope
**
** Originally developed by Steve Karnish
** http://www.cedarcreektrading.com
**
** AFL translation by Tomasz Janeczko
**
** Set scaling: Automatic
** Grid: Middle
*/
Graph0=LinRegSlope(C,13)
+ 100 * ( EMA( EMA( C - Ref( C, -1 ) ,34 ) ,21)
/ EMA( EMA( abs( C - Ref( C, -1) ),34 ), 21 ) )
+100 * ( EMA( EMA( C - (0.5 * ( HHV(H,13) + LLV(L,13))),21),3)
/ (0.5 * EMA( EMA( HHV(H,13) - LLV(L,13),21),3 ) ) );
Graph0Style=2;
Graph1=EMA(Graph0,104);
DJI=Foreign("^TSE","C");
Gra=C;
Summ=Correlation(DJI,GRA,13);
Graphh=EMA(Summ,5);
Upbar1=Graphh>0 AND C>Ref(C,-5) AND H>Ref(H,-5) AND Low>Ref(L,-5);
Upbar2=Graphh<0 AND C>Ref(C,-5) AND H>Ref(H,-5) AND Low>Ref(L,-5);
Downbar1=Graphh>0 AND C<Ref(C,-5) AND H<Ref(H,-5) AND Low<Ref(L,-5);
Downbar2=Graphh<0 AND C<Ref(C,-5) AND H<Ref(H,-5) AND Low<Ref(L,-5);
barcolor = IIf( downbar1, 4, IIf(Upbar2,8,IIf(Downbar2,15,IIf( upbar1, 5, 0))));
Graph0BarColor = ValueWhen( barcolor != 0, barcolor );
WiseStockTrader.com