第一部分 副图公式 手机/电脑
N1:=5;N2:=250;N3:=50;P:=3;
STICKLINE(C>0,0,30,10,0),COLOR353535;
STICKLINE(C>0,30,50,10,0),COLOR454545;
STICKLINE(C>0,50,80,10,0),COLOR555555;
STICKLINE(C>0,80,95,10,0),COLOR757575;
分界线:50,LINETHICK2,COLOR858585;
警示线:80,POINTDOT,COLORCYAN;
减仓线:90,COLOR00AA55,LINETHICK2;
出逃线:95,COLOR0000AA,LINETHICK2;
LC:=REF(CLOSE,1);
RSI5:SMA(MAX(CLOSE-LC,0),N1,1)/SMA(ABS(CLOSE-LC),N1,1)*100,COLORFFAAFF;
RSI10:SMA(MAX(CLOSE-LC,0),N2,1)/SMA(ABS(CLOSE-LC),N2,1)*100,COLORDDAADD;
RSI20:SMA(MAX(CLOSE-LC,0),N3,1)/SMA(ABS(CLOSE-LC),N3,1)*100,COLORAA99AA;
DRAWBAND(RSI5,RGB(195,125,195),RSI10,RGB(0,130,50));
DRAWBAND(RSI10,RGB(165,95,165),RSI20,RGB(0,100,20));
CAIH:=BARSLAST(REF(CROSS(RSI20,RSI5),1));
CAIH1:=REF(CLOSE,CAIH+1)RSI5 AND CROSS(RSI20,RSI5);
顶背离:IF(CAIH1,RSI5,DRAWNULL),CIRCLEDOT,COLORFFCC00;
STICKLINE(CAIH1,RSI5,RSI5*0.9,0,0),COLORFFCC00;
DRAWTEXT(CAIH1,RSI5*0.9,'顶背离'),COLORFFCC00;
CHA:=BARSLAST(REF(CROSS(RSI5,RSI20),1));
CHAA:=REF(CLOSE,CHA+1)>CLOSE AND RSI5>REF(RSI5,CHA+1) AND
CROSS(RSI5,RSI20);
底背离:IF(CHAA,RSI5,DRAWNULL),CIRCLEDOT,COLOR6699FF;
STICKLINE(CHAA,RSI5,RSI5*1.1,0,0),COLOR6699FF;
DRAWTEXT(CHAA,RSI5*1.1,'底背离'),COLOR6699FF;
DRAWTEXT(CURRBARSCOUNT=30,25,'强弱判趋势 背离判顶底'),COLORCC99FF;
第二部分 选股公式 |