DRAWBAND(MA(CLOSE,60),RGB(25,0,25),MA(CLOSE,90),RGB(16,16,16)); DRAWBAND(MA(CLOSE,20),RGB(255,255,0),MA(CLOSE,30),RGB(0,0,0)); DRAWBAND(MA(CLOSE,10),RGB(255,0,0),MA(CLOSE,20),RGB(0,0,0)); MA5:MA(CLOSE,5),COLORFFFFFF; MA10:MA(CLOSE,10),COLOR00FFFF; MA20:MA(C,20),COLORFF00FF; MA30:MA(C,30),COLOR00FF00; MA60:MA(CLOSE,60),COLORFF9988; MA90:MA(CLOSE,90),COLOR0000FF; DRAWKLINE(HIGH,OPEN,LOW,CLOSE); BDGD:=C=HHV(C,13); GDSJ:=BARSLAST(FILTER(CROSS(0.8,BDGD),2))+1; 高點(diǎn):REF(C,GDSJ),COLORFF00FF,POINTDOT; 突破:CROSS(C,REF(高點(diǎn),1)),COLOR00FFFF,POINTDOT,NODRAW; STICKLINE(GDSJ<=6,高點(diǎn),高點(diǎn),3,0),COLORFF00FF; DRAWTEXT(突破,LOW,'↑'),COLOR00FFFF; BDDD:=C=LLV(C,13); DDSJ:=BARSLAST(FILTER(CROSS(0.8,BDDD),2))+1; 低點(diǎn):REF(C,DDSJ),COLOR00FF00,POINTDOT; STICKLINE(DDSJ<=6,低點(diǎn),低點(diǎn),3,0),COLOR00FF00; 高點(diǎn)1:=REFDATE(HHV(H,140),DATE); 調(diào)整:=0.99;{這里是避免跟信息地雷沖突} DRAWTEXT(CURRBARSCOUNT=140,高點(diǎn)1*調(diào)整,'主營收入(萬):');{CURRBARSCOUNT=N根據(jù)自已的初始K線來調(diào),我的初始K線為140根} DRAWNUMBER(CURRBARSCOUNT=123,高點(diǎn)1*調(diào)整,FINANCE(20)/10000); DRAWTEXT(CURRBARSCOUNT=110,高點(diǎn)1*調(diào)整,'主營利潤(萬):'); DRAWNUMBER(CURRBARSCOUNT=93,高點(diǎn)1*調(diào)整,FINANCE(21)/10000); DRAWTEXT(CURRBARSCOUNT=80,高點(diǎn)1*調(diào)整,'每股收益(元):'); DRAWNUMBER(CURRBARSCOUNT=63,高點(diǎn)1*調(diào)整,FINANCE(33)); DRAWTEXT(CURRBARSCOUNT=55,高點(diǎn)1*調(diào)整,'每股凈資產(chǎn)(元):'); DRAWNUMBER(CURRBARSCOUNT=35,高點(diǎn)1*調(diào)整,FINANCE(34)); A3:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100; A4:=SMA(A3,3,1); A5:=SMA(A4,3,1); A6:=3*A4-2*A5; A7:=C-REF(C,1); A8:=100*EMA(EMA(A7,6),6)/EMA(EMA(ABS(A7),6),6); 買:=LLV(A8,2)=LLV(A8,7) AND COUNT(A8<0,2) AND CROSS(A8,MA(A8,2)); DRAWTEXT(FILTER(買=1,5),LOW-0.05,'↖買進(jìn)'),COLORYELLOW; STICKLINE(買,OPEN,CLOSE,2,0),COLORYELLOW; XS:=MA(LOW,5)*(1-5/100),LINETHICK0; XS1:=MA(HIGH,5)*(1+5/100); DRAWTEXT(CROSS(XS1,C),H*1.01,'砸'),COLORWHITE; VAR2:=(2*CLOSE+HIGH+LOW)/4; VAR3:=IF(YEAR>=2099 AND MONTH>2,0,1); VAR4:=LLV(LOW,5); VAR5:=HHV(HIGH,4); 小股民:=EMA((VAR2-VAR4)/(VAR5-VAR4)*100,4)*VAR3; 莊家:=EMA(0.667*REF(小股民,1)+0.333*小股民,2)*VAR3; DRAWTEXT(CROSS(小股民,莊家) AND 小股民<30,L-0.05,'←低吸'),COLORLIRED; DRAWTEXT(CROSS(莊家,小股民) AND 小股民>70,H+0.05,'←高拋'); B1:=REF(CLOSE,1); DRAWTEXT_FIX(1,0.02,0,0,'☆微信公眾號(hào):(程序化指標(biāo)) ☆'),COLORRED; WR:=-100*(HHV(HIGH,28)-CLOSE)/(HHV(HIGH,28)-LLV(LOW,28)); DRAWICON(FILTER(CROSS(WR,(0 - 81)),10),B1,13); DRAWICON(FILTER(CROSS((0 -19),WR),10),H*1.02,15); DRAWTEXT(FILTER(CROSS(WR,(0 - 81)),21),L*0.99,' W&R'),COLORRED; DRAWTEXT(FILTER(CROSS(0 -19,WR),21),H*1.01,' W&R'),COLORGREEN; MA18:=MA(C,18);{需要編寫選股關(guān)注微信公眾號(hào):程序化指標(biāo)} 跟:=IF(MA18>=REF(MA18,3) AND CROSS(CLOSE,MA18),1,0); DRAWTEXT(MA18>=REF(MA18,3) AND CROSS(CLOSE,MA18),LOW*0.96,'跟'),COLOR7F52AF; 買價(jià):=((C-REF(MA5,1))/5+MA5)*1.004; 買條件:=CROSS(C,買價(jià)) AND 買價(jià)>REF(買價(jià),1); 白K買進(jìn):IF(買條件,L,H),COLORWHITE,POINTDOT; STICKLINE(買條件,H,L,0,1),COLORWHITE,LINETHICK2; STICKLINE(買條件,O,C,4,1),COLORWHITE,LINETHICK2; 加碼價(jià):=((C-REF(MA10,1))/20+MA10)*1.004; 加碼條件:=CROSS(C,加碼價(jià)) AND 加碼價(jià)>REF(加碼價(jià),1); 黃K加碼:IF(加碼條件,L,H),COLORYELLOW,POINTDOT; STICKLINE(加碼條件,H,L,0,1),COLORYELLOW,LINETHICK2; STICKLINE(加碼條件,O,C,4,1),COLORYELLOW,LINETHICK2; HH0:=CONST(HHV(H,120))*1; LL0:=CONST(LLV(L,120))*1; MM0:=CONST((HH0+LL0)/2); HH1:=IF(CONST(C)<MM0,LL0-(HH0-LL0)*0.4,LL0-(HH0-LL0)*0.4),COLORRED; LL1:=LL0;HLMAX:=MAX(HH1,LL1); HLMIN:=MIN(HH1,LL1); HLMN1:=(HLMAX+HLMIN)/2; HLMN2:=(HLMAX-HLMIN); HLMN3:=HHV(V,250)/2; HLMN4:=HHV(V,250); VZ:=(V-HLMN3)*HLMN2/HLMN4+HLMN1; STICKLINE(C>=O,VZ,(0-HLMN3)*HLMN2/HLMN4+HLMN1,2.5,1),COLORRED; STICKLINE(C<O,VZ,(0-HLMN3)*HLMN2/HLMN4+HLMN1,2.5,0),COLORCYAN; (MA(V,5)-HLMN3)*HLMN2/HLMN4+HLMN1,COLORFFFFFF; (MA(V,10)-HLMN3)*HLMN2/HLMN4+HLMN1,COLOR00FFFF; T:=V=LLV(V,20); DRAWICON(T,(V-HLMN3)*HLMN2/HLMN4+HLMN1,1); STICKLINE(C/REF(C,1)>1.099,VZ,(0-HLMN3)*HLMN2/HLMN4+HLMN1,2,0),COLORRED; STICKLINE(C/REF(C,1)<0.901,VZ,(0-HLMN3)*HLMN2/HLMN4+HLMN1,2,0),COLORGREEN; VY:=(0-HLMN3)*HLMN2/HLMN4+HLMN1; STICKLINE(V>=2*REF(V,1),VZ,VY,0.3,0),COLORWHITE; STICKLINE(V>=3*REF(V,1),VZ,VY,0.3,0),COLORYELLOW; MA13:=MA(C,3); UU:=1,V<=LLV(V,13) AND MA13>REF(MA13,1); TJ:=1,REF(V,1)<=LLV(V,13) AND MA13>REF(MA13,1),COLORRED,LINETHICK3; DRAWTEXT(TJ=1,(V-HLMN3)*HLMN2/HLMN4+HLMN1+0.2,'買')COLORMAGENTA; BIAS11:=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100; BIAS12:=(CLOSE-MA(CLOSE,12))/MA(CLOSE,12)*100; BIAS13:=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100; BIAS1:=(C-MA(C,6))/MA(C,6)*100; BIAS2:=(C-MA(C,12))/MA(C,12)*100; BIAS3:=(C-MA(C,24))/MA(C,24)*100; BIAS:=(BIAS1+2*BIAS2+3*BIAS3)/6; 乖離:=MA(BIAS,3);
|