T1:=10; T2:=20; T3:=40; M1:=(HHV(C,T1)-LLV(C,T1))/(HHV(C,T1)+LLV(C,T1))*200; M2:=(HHV(C,T2)-LLV(C,T2))/(HHV(C,T2)+LLV(C,T2))*200; M3:=(HHV(C,T3)-LLV(C,T3))/(HHV(C,T3)+LLV(C,T3))*200; 短期波動:M1,COLORRED; 中期波動:M2,COLORYELLOW; 長期波動:M3,COLORMAGENTA; Z11:=VARCAT('短:',VAR2STR(MA(M1,50)/1,1)); Z12:=VARCAT('中:',VAR2STR(MA(M2,100)/2,1)); Z13:=VARCAT('長:',VAR2STR(MA(M3,200)/4,1)); Z10:=VARCAT(STRCAT('可排序波動比較',Z11),VARCAT(Z12,Z13)); DRAWTEXT_FIX(1,0,0,0,Z10),COLORYELLOW; DRAWTEXT_FIX(1,0,1,0,'通過挖掘短中長波動定勢,,可以做出很多選股公式,本指標僅供本群參考研究使用'),COLORLIGRAY; M11:=MA(M1,3);M12:=MA(M1,5); C11:=IF(M11>=M12,'短期波動增大;','短期波動減小;'); C12:=IF(M1<=5,'處于盤整階段;',IF(M1<=15,'處于趨勢狀態(tài);','處于異動狀態(tài);')); DRAWTEXT_FIX(1,0,0.1,0,STRCAT(C11,C12)); M21:=MA(M2,5);M22:=MA(M2,13); C21:=IF(M21>=M22,'中期波動增大;','中期波動減小;'); C22:=IF(M2<=10,'處于盤整階段;',IF(M2<=20,'處于趨勢狀態(tài);','處于異動狀態(tài);')); DRAWTEXT_FIX(1,0,0.2,0,STRCAT(C21,C22)); M31:=MA(M3,13);M32:=MA(M3,26); C31:=IF(M31>=M32,'長期波動增大;','長期波動減小;'); C32:=IF(M3<=15,'處于盤整階段;',IF(M3<=30,'處于趨勢狀態(tài);','處于異動狀態(tài);')); DRAWTEXT_FIX(1,0,0.3,0,STRCAT(C31,C32)); MMAX:=MAX(MAX(M12,M22),M32); MMIN:=MIN(MIN(M12,M22),M32); 集中度:100-(MMAX-MMIN)/(MMAX+MMIN)*100,NODRAW; DRAWICON(CROSS(M32,10),10,25); DRAWICON(集中度>90 AND M3<=REF(M3,1) AND M1>REF(M1,1) AND MA(C,5)>MA(C,13),M3,5); NOTEXT25:25,CROSSDOT,COLORGREEN; NOTEXT10:10,CIRCLEDOT,COLORLIGRAY; DRAWTEXT(CURRBARSCOUNT=7,10,'爆發(fā)線'); DRAWTEXT(CURRBARSCOUNT=7,25,'異動線'); J11:=CROSS(M32,10); T11:=BARSLAST(J11); TJ1:=CROSS(M1,5) AND T11<10; DRAWICON(TJ1,M3,1);
|