第一:通用公式源碼
N:=3;
N1:=5;
N2:=10;
N3:=20;
N4:=1;
M1:=7;
M2:=2;
LC :=REF(C,N4);
RSI1:SMA(MAX(C-LC,0),N1,1)/SMA(ABS(C-LC),N1,1)*100,COLOR000000,LINETHICK1;
RSI2:SMA(MAX(C-LC,0),N2,1)/SMA(ABS(C-LC),N2,1)*100,COLORBLUE,LINETHICK1;
RSI3:SMA(MAX(C-LC,0),N3,1)/SMA(ABS(C-LC),N3,1)*100,COLOR009900,LINETHICK1;
IF(RSI1<=RSI2 AND RSI2<=RSI3,RSI1,DRAWNULL),COLORCYAN,LINETHICK1;
IF(RSI2<=RSI3 AND RSI2>=RSI1,RSI2,DRAWNULL),COLORCYAN,LINETHICK1;
IF(RSI3>=RSI2 AND RSI2>=RSI1,RSI3,DRAWNULL)COLORCYAN,LINETHICK1;
IF(RSI1>=RSI2 AND RSI2>=RSI3,RSI1,DRAWNULL),COLORRED,LINETHICK1;
IF(RSI2>=RSI3 AND RSI2<=RSI1,RSI2,DRAWNULL),COLORRED,LINETHICK1;
IF(RSI3<=RSI2 AND RSI2<=RSI1,RSI3,DRAWNULL)COLORRED,LINETHICK1;
DRAWTEXT(RSI1>=RSI2 AND RSI2>=RSI3 AND RSI3>=30,90,'△'),COLORRED;
DRAWTEXT(RSI1<=RSI2 AND RSI2<=RSI3 AND RSI3<=80,85,'▽'),COLORCYAN;
DRAWTEXT(RSI1>=80,80,'★'),COLORBLUE;
DRAWTEXT(RSI1<=15,20,'★'),COLOR000000;
DRAWTEXT(RSI1>=50 AND RSI2>=50 AND RSI3>=50,90,'▲'),COLORRED,LINETHICK3;
DRAWTEXT(RSI1<=50 AND RSI2<=50 AND RSI3<=50,85,'▼'),COLORCYAN,LINETHICK3;
TY:=RSI1;{通用曲線值的引入}
AA:=REF(TY,N)=HHV(TY,2*N+1);
BB:=BACKSET(AA,N+1);
CC:=FILTER(BB,N) AND TY=HHV(TY,N+1);
AA2:=REF(TY,N)=LLV(TY,2*N+1);
BB2:=BACKSET(AA2,N+1);
CC2:=FILTER(BB2,N) AND TY=LLV(TY,N+1);
GG:=ISLASTBAR AND REF(CC,BARSLAST(CC));
HH:=BACKSET(GG,BARSLAST(CC)+1);
II:=HH>REF(HH,1);
JJ:=REF(BARSLAST(CC),1);
KK:=BACKSET(II,JJ+2);
LL:=KK>REF(KK,1);
DRAWLINE(LL,TY,II,TY,1),COLORRED,LINETHICK2;
CS:=(REF(TY,BARSLAST(II))-REF(TY,BARSLAST(LL)))/(BARSLAST(LL)-BARSLAST(II));
阻力線:=REF(TY,BARSLAST(II))+BARSLAST(II)*CS;
阻力值:阻力線,LINETHICK2;
DRAWICON(CROSS(TY,阻力線),阻力線*0.50,33);
GG2:=ISLASTBAR AND REF(CC2,BARSLAST(CC2));
HH2:=BACKSET(GG2,BARSLAST(CC2)+1);
II2:=HH2>REF(HH2,1);
JJ2:=REF(BARSLAST(CC2),1);
KK2:=BACKSET(II2,JJ2+2);
LL2:=KK2>REF(KK2,1);
DRAWLINE(LL2,TY,II2,TY,1),COLORBLUE,LINETHICK2;
20,COLOR009900,POINTDOT,LINETHICK1;
50,COLORBLUE,LINETHICK1;
80,COLORRED,POINTDOT,LINETHICK1;
{頂?shù)讅
DRAWTEXT(MACD>=0 AND CR>=100 AND KD>=80 AND RSI>=80 ,80,'【賣】'),COLORBLUE;
DRAWTEXT(MACD<=0 AND CR<=100 AND RSI<=20 AND KD<=20,5,'【買】'),COLOR000000;
{CR上60手機}
DRAWICON(CROSS(CR,60),60,20);
{RSI上20蘋果}
DRAWICON(CROSS(RSI,15),60,16);
{KD上15笑臉}
DRAWICON(CROSS(KD,15),60,5);
{CCI上-200鉆石}
DRAWICON( CROSS(CCI,-200) AND CCI>=REF(CCI,1),0,25);
{起爆點}
DIF1:=EMA(DCLOSE,2)-EMA(DCLOSE,3);
DEA1:=EMA(DIF1,4);
AAA1:=(DIF1-DEA1)*2*60;
起爆點:=AAA1-REF(AAA1,1);
DRAWICON(CROSS(起爆點,4),60,9);
{起跌點}
起跌點:=REF(AAA1,1)-AAA1;
DRAWICON(CROSS(起跌點, 4),60,15);
主要講解的是指標線中的阻力線和壓力線,以及在實戰(zhàn)中的起爆點、起跌點和頂部底部的識別和判斷,希望投資者能夠根據(jù)具體的圖形走勢進行分析。
第二:多周期RSI指標公式
LC:=REF(CLOSE,1);
RSI11:MA(SMA(MAX(CLOSE-LC,0),11,1)/SMA(ABS(CLOSE-LC),11,1)*100,3),COLORRED;
RSI13:MA(SMA(MAX(CLOSE-LC,0),13,1)/SMA(ABS(CLOSE-LC),13,1)*100,3),COLORRED;
RSI15:MA(SMA(MAX(CLOSE-LC,0),15,1)/SMA(ABS(CLOSE-LC),15,1)*100,3),COLORRED;
RSI17:MA(SMA(MAX(CLOSE-LC,0),17,1)/SMA(ABS(CLOSE-LC),17,1)*100,3),COLORRED;
RSI20:MA(SMA(MAX(CLOSE-LC,0),20,1)/SMA(ABS(CLOSE-LC),20,1)*100,3),COLORRED;
RSI30:MA(SMA(MAX(CLOSE-LC,0),30,1)/SMA(ABS(CLOSE-LC),30,1)*100,3),COLORGREEN;
RSI35:MA(SMA(MAX(CLOSE-LC,0),35,1)/SMA(ABS(CLOSE-LC),35,1)*100,3),COLORGREEN;
RSI40:MA(SMA(MAX(CLOSE-LC,0),40,1)/SMA(ABS(CLOSE-LC),40,1)*100,3),COLORGREEN;
RSI45:MA(SMA(MAX(CLOSE-LC,0),45,1)/SMA(ABS(CLOSE-LC),45,1)*100,3),COLORGREEN;
RSI50:MA(SMA(MAX(CLOSE-LC,0),50,1)/SMA(ABS(CLOSE-LC),50,1)*100,3),COLORGREEN;
RSI100:SMA(MAX(CLOSE-LC,0),100,1)/SMA(ABS(CLOSE-LC),100,1)*100,COLORYELLOW;
RSI150:SMA(MAX(CLOSE-LC,0),150,1)/SMA(ABS(CLOSE-LC),150,1)*100,COLORYELLOW;
RSI200:SMA(MAX(CLOSE-LC,0),200,1)/SMA(ABS(CLOSE-LC),200,1)*100,COLORYELLOW;
RSI250:SMA(MAX(CLOSE-LC,0),250,1)/SMA(ABS(CLOSE-LC),250,1)*100,COLORYELLOW;
RSI300:SMA(MAX(CLOSE-LC,0),300,1)/SMA(ABS(CLOSE-LC),300,1)*100,COLORYELLOW;
50,POINTDOT;
指的是RSI指標在多周期中的應用方法和技巧,其周期與K線的周期劃分是一致的,有分鐘線、小時線的以及日線、周線和月線的周期分析方法,具體的走勢結(jié)合下面的圖形可以進行研究和分析。
第三種:rsi三級跳指標公式
VAR1:=100-90*(HHV(HIGH,20)-CLOSE)/(HHV(HIGH,20)-LLV(LOW,20));
VAR2:=100-90*(HHV(HIGH,20)-CLOSE)/(HHV(HIGH,20)-LLV(LOW,20));
VAR3:=100-MA(100*(HHV(HIGH,6)-CLOSE)/(HHV(HIGH,6)-LLV(LOW,6)),28);
買入信號: IF(VAR2
賣出信號: IF(VAR1>MA(VAR3,6),MA(VAR3,6),VAR1),COLORGREEN,LINETHICK2;
強弱線: MA(VAR3,6),COLORYELLOW ,LINETHICK1;
海面:25,COLORGREEN;
分界線:50,COLORWHITE;
天際:75,COLORMAGENTA;
其中,主要介紹的是指標走勢中的買入信號和賣出信號,以及強弱線的分界線和實戰(zhàn)技巧,而在圖中的顯示是依據(jù)股價的走勢產(chǎn)生的買賣信號。
第四種:RSI三線交合公式
N1:=6;N2:=12;N3:=24;
LC:=REF(CLOSE,1);
RSI1:=SMA(MAX(CLOSE-LC,0),N1,1)/SMA(ABS(CLOSE-LC),N1,1)*100;
RSI2:=SMA(MAX(CLOSE-LC,0),N2,1)/SMA(ABS(CLOSE-LC),N2,1)*100;
RSI3:=SMA(MAX(CLOSE-LC,0),N3,1)/SMA(ABS(CLOSE-LC),N3,1)*100;
AA1:IF(RSI1
AA2:IF(RSI1
AA3:RSI3,COLORBLUE;
我們需要明確的是rsi指標具有三條線的基本走勢,當三條線粘合在一起的時候,有可能是形成的上漲的金叉走勢,也可能是死叉的賣出信號,其公式的源碼圖形如下:
第五種:另類RSI指標公式
雖然說指標的源碼公式是可以修改編譯的,但是想要正確的編譯股票公式,還需要了解基本的公式源碼,如rsi另類指標的公式如下:
rsi12:SMA((c-ref(c,1)),12,1)/SMA(ABS(c-ref(c,1)),12,1)*100,COLORWHITE;
FRSI36:-SMA((c-ref(c,1)),36,1)/SMA(ABS(c-ref(c,1)),36,1)*100,COLORGREEN;
0,COLORRED;
修改之后的,源碼顯示的是兩條線的走勢,可以更加清楚的顯示股價對應的買入點和賣出點位置。
以上就是本文講解的5種另類的rsi指標公式源碼,如果您還想要了解更多的股市操作源碼公式,請點擊股票技術(shù)指標公式,為您提供更加全面的技術(shù)指標公式源碼解析和案例分享。
下一篇:大資金買賣指標——BBD源碼
服務中心:鄭州市金水區(qū)農(nóng)業(yè)路經(jīng)三路
郵編:450002 網(wǎng)址:m.hbzcqc.cn
銷售熱線:0371-65350319
技術(shù)支持:13333833889