通達信短線與中長線強弱分界大勝買賣指標公式股票軟件源碼如下:
F:=100*(C-REF(C,1))/REF(C,1); 今小昨:=IF(C<REF(O,1) AND F<0,1,0); S1:=今小昨; 今小前:=IF(C<REF(O,2) AND F<0,1,0),LINETHICK0; S2:=今小前; A1:=S1=0 AND REF(S1,1)=1 AND S2=0 AND REF(S2,1)=1 AND CROSS(ZIG(3,3) ,REF(ZIG(3 ,3),1)); A2:=S1=0 AND REF(S1,1)=1 AND S2=0 AND REF(S2,1)=1 AND CROSS(ZIG(3,5) ,REF(ZIG(3 ,5),1)); A3:=S1=0 AND REF(S1,1)=1 AND S2=0 AND REF(S2,1)=1 AND CROSS(ZIG(3,10) ,REF(ZIG(3 ,10),1)); STICKLINE(A1 AND A2 ,0,50,3,0)COLORGREEN; STICKLINE(A1 AND A2 ,0,30,3,0)COLORBLUE; STICKLINE(A1 AND A2 AND A3,0,50,3,0)COLORYELLOW; STICKLINE(A1 AND A2 AND A3,0,30,3,0)COLORFF00FF; STICKLINE(A1 AND A2 AND A3,0,10,3,0)COLORBLUE; DRAWTEXT(A3=1,4.8,'長攻!'),COLORSTICK; 智勇出擊: ZIG(3,6)>REF(ZIG(3,6),1)AND REF(ZIG(3,6),1)<REF(ZIG (3,6),2),COLORWHITE,LINETHICK2; DRAWTEXT(智勇出擊=1,0.10,'突襲!'),COLORWHITE; 小獲且退: ZIG(3,10)<REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)>REF(ZIG (3,10),2),COLORYELLOW,LINETHICK2; {www.gupang.com 股旁網(wǎng)_通達信LOWV:=LLV(LOW,9); HIGHV:=HHV(HIGH,9); RSV:=EMA((CLOSE-LOWV)/(HIGHV-LOWV)*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; 逃頂線:85,COLORGREEN; 中軸線: 50,COLORRED; 抄底線:10,COLORGREEN; DRAWICON(CROSS(K,D),12,1),COLORRED; DRAWICON(CROSS(D,K),88,2),COLORGREEN; VAR1:=(2*CLOSE+HIGH+LOW+OPEN)/5; 高拋: 80; VAR2:=LLV(LOW,34); VAR3:=HHV(HIGH,34); SK: EMA((VAR1-VAR2)/(VAR3-VAR2)*100,13); SD: EMA(SK,3); 低吸: 20; 強弱分界: 50;
|