• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Tìm hiểu thêm.

Một chỉ báo hay về RSI

traders

Administrator
Thành viên BQT
Tham gia ngày
29/4/17
Bài viết
224
Thích
3
Điểm
18
Website
traders.vn
#1
Dynamic RSI for Amibroker (AFL)

Code sưu tầm:
------------------------------------------------------------
// AFL for Dynamic RSI
//============================================================
_SECTION_BEGIN("Dynamic RSI");

DZbuy = Param("Buy Zone Probability",0.1,0.1,0.5,0.1);
DZsell = Param("Sell Zone Probability",0.1,0.1,0.5,0.1);
Period = Param("Period", 14, 2, 30, 1);

Lb = Param("LookBack Period",60,40,120,1);
RSILine = RSI(Period);
jh = HHV(RSILine,Lb);
jl = LLV(RSILine,Lb);
jc = (WMA((jh-jl),Period)*0.50)+WMA(jl,Period);
Hiline = jh-jc*DZbuy;
Loline = jl+jc*DZsell;
//midline = (jh-jl)/2;
Plot(HiLine,"",colorDarkRed, styleThick| styleDashed);
Plot(LoLine,"",colorDarkRed, styleDashed|styleThick);
Plot(jc, "",colorGrey40, styleDashed|styleThick);

R = ( 4 * RSILine + 3 * Ref(RSILine,-1) + 2 * Ref(RSILine,-2) + Ref(RSILine,-3) ) / 10;
Plot(R,"",IIf(R>jc,colorLime,colorRed),styleThick);
kh = IIf(R>Hiline, R,Hiline);
PlotOHLC( kh,kh,Hiline,Hiline, "", IIf(R>HiLine,colorLime,colorBlack), styleCloud );
kl = IIf(R <Loline, R,Loline);
PlotOHLC( Loline,Loline,kl,kl, "", IIf(R<HiLine,colorRed,colorBlack), styleCloud );
Title = Name() + "- Floating Level RSI V1.0(" + WriteVal(period, 1.0) + ")";
Dynamic RSI for Amibroker (AFL).png
 
Top