副图公式源码 :支持手机/电脑
VLOW:=LLV(LOW,9);
VHIGH:=HHV(HIGH,9);
RSV:=EMA((CLOSE-VLOW)/(VHIGH-VLOW)*100,3);
K:EMA(RSV,3);
D:MA(K,3);
STICKLINE(K>D,K,D,2.5,0),COLORRED,LINETHICK2;
STICKLINE(D>K,K,D,2.5,0),COLORGREEN,LINETHICK2;
顶部线:90,COLORGREEN;
中位线:50,COLORRED;
底部线:10,COLORYELLOW;
DRAWICON(CROSS(K,D) AND K<=50,12,25),COLORRED;
DRAWICON(CROSS(D,K) AND K>=80,88,4),COLORGREEN;
GUP1:=BARSLAST(REF(CROSS(K,D),1));
底背离:REF(CLOSE,GUP1+1)>CLOSE AND K>REF(K,GUP1+1) AND CROSS(K,D);
GUP2:=BARSLAST(REF(CROSS(D,K),1));
顶背离:REF(CLOSE,GUP2+1)<CLOSE AND REF(D,GUP2+1)>D AND CROSS(D,K);
DRAWTEXT(底背离>0,D-5,'加'),COLORRED;
DRAWTEXT(顶背离>0,D-5,'减'),COLORGREEN;
DRAWTEXT(CROSS(K,D) AND (D < 8),30,'买'),COLORRED;
STICKLINE(CROSS(K,D) AND (D < 8)=1,3,20,8,0),COLORRED;
DRAWTEXT(CROSS(D,K) AND (D > 85),70,'卖'),COLORGREEN;
STICKLINE(CROSS(D,K) AND (D > 85)=1,85,70,8,0),COLORGREEN;
选股公式源码
{选股公式一:红钻}
VLOW:=LLV(LOW,9),colorwhite;
VHIGH:=HHV(HIGH,9),colorwhite;
RSV:=EMA((CLOSE-VLOW)/(VHIGH-VLOW)*100,3),colorwhite;
K:=EMA(RSV,3),colorwhite;
D:=MA(K,3),colorwhite;
红钻:CROSS(K,D) AND K<=50;
{选股公式二:买}
VLOW:=LLV(LOW,9),colorwhite;
VHIGH:=HHV(HIGH,9),colorwhite;
RSV:=EMA((CLOSE-VLOW)/(VHIGH-VLOW)*100,3),colorwhite;
K:=EMA(RSV,3),colorwhite;
D:=MA(K,3),colorwhite;
买:CROSS(K,D) AND (D < 8);
{选股公式三:加}
VLOW:=LLV(LOW,9);
VHIGH:=HHV(HIGH,9);
RSV:=EMA((CLOSE-VLOW)/(VHIGH-VLOW)*100,3);
K:=EMA(RSV,3);
D:=MA(K,3);
GUP1:=BARSLAST(REF(CROSS(K,D),1));
底背离:=REF(CLOSE,GUP1+1)>CLOSE AND K>REF(K,GUP1+1) AND CROSS(K,D);
加:底背离>0; |