第一:通用公式源碼
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;{通用曲線(xiàn)值的引入}
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));
阻力線(xiàn):=REF(TY,BARSLAST(II))+BARSLAST(II)*CS;
阻力值:阻力線(xiàn),LINETHICK2;
DRAWICON(CROSS(TY,阻力線(xiàn)),阻力線(xiàn)*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,'【賣(mài)】'),COLORBLUE;
DRAWTEXT(MACD<=0 AND CR<=100 AND RSI<=20 AND KD<=20,5,'【買(mǎi)】'),COLOR000000;
{CR上60手機(jī)}
DRAWICON(CROSS(CR,60),60,20);
{RSI上20蘋(píng)果}
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);
{起爆點(diǎn)}
DIF1:=EMA(DCLOSE,2)-EMA(DCLOSE,3);
DEA1:=EMA(DIF1,4);
AAA1:=(DIF1-DEA1)*2*60;
起爆點(diǎn):=AAA1-REF(AAA1,1);
DRAWICON(CROSS(起爆點(diǎn),4),60,9);
{起跌點(diǎn)}
起跌點(diǎn):=REF(AAA1,1)-AAA1;
DRAWICON(CROSS(起跌點(diǎn), 4),60,15);
主要講解的是指標(biāo)線(xiàn)中的阻力線(xiàn)和壓力線(xiàn),以及在實(shí)戰(zhàn)中的起爆點(diǎn)、起跌點(diǎn)和頂部底部的識(shí)別和判斷,希望投資者能夠根據(jù)具體的圖形走勢(shì)進(jìn)行分析。
第二:多周期RSI指標(biāo)公式
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指標(biāo)在多周期中的應(yīng)用方法和技巧,其周期與K線(xiàn)的周期劃分是一致的,有分鐘線(xiàn)、小時(shí)線(xiàn)的以及日線(xiàn)、周線(xiàn)和月線(xiàn)的周期分析方法,具體的走勢(shì)結(jié)合下面的圖形可以進(jìn)行研究和分析。
第三種:rsi三級(jí)跳指標(biāo)公式
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);
買(mǎi)入信號(hào): IF(VAR2
賣(mài)出信號(hào): IF(VAR1>MA(VAR3,6),MA(VAR3,6),VAR1),COLORGREEN,LINETHICK2;
強(qiáng)弱線(xiàn): MA(VAR3,6),COLORYELLOW ,LINETHICK1;
海面:25,COLORGREEN;
分界線(xiàn):50,COLORWHITE;
天際:75,COLORMAGENTA;
其中,主要介紹的是指標(biāo)走勢(shì)中的買(mǎi)入信號(hào)和賣(mài)出信號(hào),以及強(qiáng)弱線(xiàn)的分界線(xiàn)和實(shí)戰(zhàn)技巧,而在圖中的顯示是依據(jù)股價(jià)的走勢(shì)產(chǎn)生的買(mǎi)賣(mài)信號(hào)。
第四種:RSI三線(xiàn)交合公式
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指標(biāo)具有三條線(xiàn)的基本走勢(shì),當(dāng)三條線(xiàn)粘合在一起的時(shí)候,有可能是形成的上漲的金叉走勢(shì),也可能是死叉的賣(mài)出信號(hào),其公式的源碼圖形如下:
第五種:另類(lèi)RSI指標(biāo)公式
雖然說(shuō)指標(biāo)的源碼公式是可以修改編譯的,但是想要正確的編譯股票公式,還需要了解基本的公式源碼,如rsi另類(lèi)指標(biāo)的公式如下:
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;
修改之后的,源碼顯示的是兩條線(xiàn)的走勢(shì),可以更加清楚的顯示股價(jià)對(duì)應(yīng)的買(mǎi)入點(diǎn)和賣(mài)出點(diǎn)位置。
以上就是本文講解的5種另類(lèi)的rsi指標(biāo)公式源碼,如果您還想要了解更多的股市操作源碼公式,請(qǐng)點(diǎn)擊股票技術(shù)指標(biāo)公式,為您提供更加全面的技術(shù)指標(biāo)公式源碼解析和案例分享。
服務(wù)中心:鄭州市金水區(qū)農(nóng)業(yè)路經(jīng)三路
郵編:450002 網(wǎng)址:s5l8a2.cn
銷(xiāo)售熱線(xiàn):0371-65350319
技術(shù)支持:13333833889