A0:=(L+H+C*2)/4; A1:=EMA(A0,3),coloryellow,LINETHICK2,NODRAW; A2:=EMA(A0,7),colorliblue,LINETHICK2; A1X:=(A1-REF(A1,1))/REF(A1,1)*100,NODRAW; A2X:=(A2-REF(A2,1))/REF(A2,1)*100,NODRAW; 買進(jìn):IF(A2X>=0,REF(EMA(C,7),BARSLAST(CROSS(A2X,0))+1),DRAWNULL),colorred,,POINTDOT,LINETHICK6; 逃頂:IF(A1X<0,REF(EMA(C,3),BARSLAST(CROSS(0,A1X))+1),DRAWNULL),colorgreen,POINTDOT,LINETHICK6; //{看多 看空} A11:=EMA(A0,3),colorblue; A12:=EMA(A0,7),colorliblue; A11X:=(A11-REF(A11,1))/REF(A11,1)*100,NODRAW; A12X:=(A12-REF(A12,1))/REF(A12,1)*100,NODRAW; 看多:IF(A11X>=0 AND BARSLAST(CROSS(A11X,0))>0,REF((C+O)/2,BARSLAST(CROSS(A11X,0))),DRAWNULL),colormagenta; 看空:IF(A11X<0 AND BARSLAST(CROSS(0,A11X))>0,REF((C+O)/2,BARSLAST(CROSS(0,A11X))),DRAWNULL),colorcyan; //{支撐 壓力 藍(lán)柱出 } A3:=EMA(C,6),colorwhite,LINETHICK1; A3X:=(A3-REF(A3,1))/REF(A3,1)*100,NODRAW; 支撐位:IF(A3X>=0,REF(EMA(C,11),BARSLAST(CROSS(A3X,0))+1),DRAWNULL),COLORRED; 壓力位:IF(A3X<0,REF(EMA(C,11),BARSLAST(CROSS(0,A3X))+1),DRAWNULL),colorgreen; STICKLINE(CROSS(A3X,0),C,O,1.5,0),coloryellow; STICKLINE(CROSS(0,A3X),C,O,1.5,0),colorblue; {} 買入:IF(A1X>=0,A1,DRAWNULL),COLORRED,NODRAW; 賣出:IF(A1X<0 AND A2X<0,A1,DRAWNULL),colorgreen,NODRAW; STICKLINE(CROSS(A1X,0),C,O,1.5,0),COLORRED; STICKLINE(CROSS(0,A1X),C,O,0.5,0),colorliblue; {STICKLINE(CROSS(A1X,0)OR CROSS(0,A1X),REF(EMA(C,14),1),REF(EMA(C,14),1)*0.996,2,0),colorwhite; STICKLINE(ISLASTBAR,REF(EMA(C,4),1),REF(EMA(C,4),1)*0.996,3,0),colorlimagenta;} //{分界線} T1B:=CONST(LLVBARS(LOW,10)); T1HIGH:=CONST(REF(HIGH,T1B)); CCC:=CONST(CURRBARSCOUNT); T2B:=CONST(BARSLAST(CURRBARSCOUNT>CCC+T1B AND H>T1HIGH)); T2HIGH:=CONST(REF(HIGH,T2B)); T3B:=CONST(BARSLAST(CURRBARSCOUNT>CCC+T2B AND HIGH>T2HIGH)); T3HIGH:=CONST(REF(HIGH,T3B)); 過線:DRAWLINE(CURRBARSCOUNT=T3B+1, T3HIGH, ISLASTBAR, T3HIGH, 1),coloryellow,DOTLINE; DRAWTEXT(ISLASTBAR, T3HIGH,' 過去線'),LINETHICK1,coloryellow; 過線1:=T3HIGH,NODRAW,coloryellow; N1:=10; TK:=CONST(HHVBARS(V,10)),COLOR0000FF,LINETHICK1; 量能平臺:IF(CURRBARSCOUNT<=N1+0,CONST(IF(TK=0,C,REF(C,TK))),DRAWNULL),colorgray,LINETHICK1; NOTEXT_新量能點(diǎn):IF(CURRBARSCOUNT=TK+1,量能平臺,DRAWNULL),CIRCLEDOT,COLORFFFFFF,LINETHICK5; DRAWTEXT(ISLASTBAR,量能平臺,' 量能平臺'),colorgray; //{突破線} STICKLINE(ISLASTBAR,REF(EMA(C,14),1),REF(EMA(C,14),1),50,0),colorwhite; DRAWTEXT(ISLASTBAR,REF(EMA(C,14),0),' 突破線'),colorwhite; //{前高 前低} {VAR31:=BACKSET(REF(HIGH,2)=HHV(HIGH,5),3); VAR41:=CROSS(VAR31,0.9); VAR51:=BACKSET(REF(LOW,2)=LLV(LOW,5),3); VAR61:=CROSS(VAR51,0.1); 前高:REF(HIGH,BARSLAST(VAR41)),NODRAW,coloryellow; STICKLINE(C,REF(HIGH,BARSLAST(VAR41)),REF(HIGH,BARSLAST(VAR41)),2,1),COLOR00FFFF; 前低:REF(LOW,BARSLAST(VAR61)),NODRAW,COLORLIGRAY; STICKLINE(C,REF(LOW,BARSLAST(VAR61)),REF(LOW,BARSLAST(VAR61)),2,1),COLORLIGRAY; 近日高:=HHV(H,5),NODRAW,colorligreen; STICKLINE(ISLASTBAR,HHV(H,5),HHV(H,5),40,-1),colorligreen; 近日低:=HHV(L,5),NODRAW,colorlicyan; STICKLINE(ISLASTBAR,LLV(L,5),LLV(L,5),30,-1),colorlicyan;} //{MA3 5 7 13 止損 休息} 趨勢線:=EMA(C,3); 生命線:=EMA(C,7); 工作線:=EMA(C,5); 止損線:=EMA(C,13); DRAWBAND(趨勢線-0.001,RGB(150,10,10),工作線+0.001,RGB(240,255,255)); B11:=EMA(C,11); 趨勢:IF(C>=趨勢線 AND EMA(C,3)>=EMA(C,5),趨勢線,DRAWNULL),COLOR000099,LINETHICK1; 生命:IF(C>=生命線 AND EMA(C,7)>=EMA(C,11),生命線,DRAWNULL),COLORFF7F00; 工作:IF(C>=工作線 AND EMA(C,5)>=EMA(C,7),工作線,DRAWNULL),COLOR663399,LINETHICK1; 止損:IF(C>=止損線 AND EMA(C,11)>=EMA(C,14),止損線,DRAWNULL),coloryellow; 準(zhǔn)備區(qū):IF(C>=工作線 AND EMA(C,14)<EMA(C,25),工作線,DRAWNULL), colormagenta; 休息:IF(C<B11,B11,DRAWNULL),LINETHICK1,colorgreen; DRAWICON((ZIG(3,5)>REF(ZIG(3,5),1)) AND (REF(ZIG(3,5),1)<=REF(ZIG(3,5),2)) AND (REF(ZIG(3,5),2)<=REF(ZIG(3,5),3)),LOW*0.992,1); DRAWICON((ZIG(3,5)<REF(ZIG(3,5),1)) AND (REF(ZIG(3,5),1)>=REF(ZIG(3,5),2)) AND (REF(ZIG(3,5),2)>=REF(ZIG(3,5),3)),HIGH*1.006,2); //{倍量 啟動(dòng)} V2:=IF(CURRBARSCOUNT=1,VOL*240/FROMOPEN/REF(VOL,1)-1,VOL/REF(VOL,1)-1); STICKLINE(V2>=1,O,C,1.5,0),coloryellow; MA13:=MA(CLOSE,13); X1:=(C+L+H)/3; BB13:=ATAN(EMA(X1,13)-REF(EMA(X1,13),1))*3.1416*10; EMA8:=EMA(C,8); B0:=MIN(O,C); B1:=ABS(O-C); T1:=FILTER(BB13>1 AND EMA(X1,13)>REF(EMA(X1,8),1),10); STICKLINE(T1,B0,B0+B1/4,1,0),COLOR007575; STICKLINE(T1,B0+B1/4,B0+B1/2,1,0),COLORFF0000; STICKLINE(T1,B0+B1/2,B0+B1*3/4,1,0),COLOR007575; STICKLINE(T1,B0+B1*3/4,B0+B1,1,0),COLORFF0000; //{黑柱出逃} LC:=REF(CLOSE,1); RSI:=((SMA(MAX((CLOSE - LC),0),3,1) / SMA(ABS((CLOSE - LC)),3,1)) * 100); FF:=EMA(CLOSE,3); MA15:=EMA(CLOSE,21); STICKLINE(CROSS(FF,MA15),B0,B0+B1/2,1,0),COLOR7F017F; STICKLINE(CROSS(88,RSI),B0+B1,B0+B1/2,1.5,0),colorblack; T2:=COUNT(CROSS(BBI,3),3)=1 AND CROSS(C,BBI); DRAWTEXT(T2,H*1.05,'反轉(zhuǎn)'),colorwhite; STICKLINE(T2,O,C,1,0),COLORRED; //{漲 跌 震幅%線 }; T12:=V2>=1; T0:=BARSLAST(T12); L1:=REF(L,T0); H1:=REF(H,T0); STICKLINE(REF(T12,1) OR REF(T12,2) OR REF(T12,3),H1,H1,3,-1),colorwhite; STICKLINE(REF(T12,1) OR REF(T12,2) OR REF(T12,3),L1,L1,3,-1),colorwhite; T13:=REF(T12,3) AND COUNT(L<L1,4)=0 AND COUNT(L>H1,4)>1; L11:=MIN(REF(L,1),L); L10:=MIN(L11,REF(L,2)); L21:=MAX(REF(L,1),L); L20:=MAX(L21,REF(L,2)); T111:=(REF(V2>=1,3) OR REF(V2>=1,2) OR REF(V2>=1,1)) AND ((L10>L1 AND L20>H1) OR (L11>L1 AND L21>H1)); T11:=T111 AND REF(T111,1)=0; STICKLINE(T11,O,C,1,0),COLORFF00FF; STICKLINE(T1,B0,B0+B1/2,1,0),COLOR007575; STICKLINE(T1,B0+B1/2,B0+B1,1,0),colorblue; STICKLINE(T11 AND T12,B0,B0+B1/2,1,0),COLORFF00FF; STICKLINE(T11 AND T12,B0+B1/2,B0+B1,2,0),coloryellow; STICKLINE(T1 AND T12,B0+B1/3,B0+B1,2,0),coloryellow; STICKLINE(T1 AND T12,B0,B0+B1/3,1,0),COLOR007575; STICKLINE(T1 AND T12,B0+B1/3,B0+B1*2/3,1,0),colorblue; {STICKLINE(T2 AND T12,B0+B1/2,B0+B1,1,0),COLORRED;}; STICKLINE(T2 AND T12,B0,B0+B1/2,1,0),coloryellow; C2:=REF(C,1); 非ST漲停:=IF((C-C2)*100/C2>=(10-0.01*100/C2),1,0); 漲停:=非ST漲停; NUMBER:=COUNT(非ST漲停,BARSSINCE(非ST漲停)+1); DRAWNUMBER(非ST漲停,HIGH*1.04,NUMBER),colorwhite; DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.10,0.02,0,NUMBER),colorwhite; DRAWTEXT_FIX(CURRBARSCOUNT=1,0.02,0.02,0,'上市以來共漲停'),coloryellow; //?{紅綠燈 副圖} DRAWTEXT_FIX(ISLASTBAR=1,0.01,0.75,0,STKNAME),colorwhite; DRAWTEXT_FIX(ISLASTBAR=1,0.06,0.75,0,CODE),coloryellow; //{紅綠燈 } DIFF:=(EMA(C,3)-EMA(C,26))*10,COLORRED,NODRAW; 紅燈:IF(DIFF>=REF(DIFF,1),2,DRAWNULL),COLORRED,LINETHICK7; {IF(DIFF>=REF(DIFF,1),2,DRAWNULL),COLOR000055,LINETHICK8; IF(DIFF>=REF(DIFF,1),2,DRAWNULL),COLOR0000DD,LINETHICK5; IF(DIFF>=REF(DIFF,1),2,DRAWNULL),COLOR0000FF,LINETHICK2;} 綠燈:IF(DIFF<REF(DIFF,1),2,DRAWNULL),COLOR00FF00,LINETHICK7; {IF(DIFF<=REF(DIFF,1),2,DRAWNULL),COLOR00BB00,LINETHICK6; IF(DIFF<=REF(DIFF,1),2,DRAWNULL),COLOR00DD00,LINETHICK4; IF(DIFF<=REF(DIFF,1),2,DRAWNULL),COLOR00FF00,LINETHICK2;} //{紅球進(jìn),有ZIG} DRAWICON(CROSS(ZIG(3,10) ,REF(ZIG(3 ,10),1)),2,34); //{綠球出,有ZIG} DRAWICON(CROSS(REF(ZIG(3,10),1),ZIG(3,10)),2,35); VAR1:=LLV(LOW,10); VAR2:=HHV(HIGH,25); 趨勢線:EMA((CLOSE-VAR1)/(VAR2-VAR1)*4,9),coloryellow; IF(趨勢線>REF(趨勢線,1),趨勢線,DRAWNULL),COLORRED; IF(趨勢線=REF(趨勢線,1),趨勢線,DRAWNULL),coloryellow; IF(趨勢線<REF(趨勢線,1),趨勢線,DRAWNULL),colorligreen; 短底:IF(TROUGHBARS(2,5,1)=1 AND HIGH>LOW+0,1.5,0.9),colorlired; 大頂:IF(PEAKBARS(1,6,1)<1,2.6,3.2),colorgreen; |
|