N日平臺:=20;
所屬板塊:=STRCAT('【所屬板塊】',STRCAT(STRCAT(STRCAT('【行業】',HYBLOCK),STRCAT('【概念】',GNBLOCK)),STRCAT('【地區】',DYBLOCK)));
DRAWTEXT_FIX(ISLASTBAR,0.00,0.0,0,所屬板塊),COLORBLUE;
MA5:MA(CLOSE,5),COLORDDDDDD;
MA10:MA(CLOSE,10),COLOR00DDDD;
MA20:MA(CLOSE,20),DOTLINE,COLORDD00DD;
MA60:MA(CLOSE,60),DOTLINE,COLOR00DD00;
X_1:=vol/REF(MA(VOL,5),1);
X_2:=(CLOSE/REF(CLOSE,1)-1)*100;
X_3:=CLOSE=HHV(CLOSE,N日平臺);
X_4:=BArslAST(FILTER(crOSS(0.9,X_3),2))+1;
平臺高點:REF(CLOSE,X_4),NODRAW,COLOR8800FF;
X_5:=CLOSE=LLV(CLOSE,N日平臺);
X_6:=BARSLAST(FILTER(CROSS(0.9,X_5),2))+1;
平臺低點:REF(CLOSE,X_6),NODRAW,COLORFF8800;
X_7:=IF(FINDHIGHBARS(平臺高點,1,20,1)>=10,1,0);
X_8:=CROSS(CLOSE,平臺高點);
STICKLINE(X_8>0 AND X_1>1 AND X_2>=3 AND X_7>0,OPEN,CLOSE,2,0),COLORYELLOW;
平臺突破:IF(X_8>0 AND X_1>1 AND X_2>=3 AND X_7>0,1,0),NODRAW,COLORYELLOW;
STICKLINE(X_4<=30,平臺高點,平臺高點,4,0),COLOR8800FF;
STICKLINE(X_6<=30,平臺低點,平臺低點,4,0),COLORFF8800;
KCBB:=IF(CODELIKE('68') OR CODELIKE('30'),1,0);
ZF0:=IF(KCBB=1,1.195,1.093);
炸1:=H>REF(C,1)*ZF0 AND C<h;
漲停10:=C>REF(C,1)*ZF0;
炸2:=IF(炸1 AND NOT(漲停10),1,0);
LX11:=BARSLAST(炸2>0);
炸3:IF(炸1 AND NOT(漲停10),H*1,DRAWNULL),CIRCLEDOT,COLORBLUE,LINETHICK2;
ZB:=炸1 AND NOT(漲停10);
Z16:=BARSLAST(ZB>0);
Z26:=REF(HHV(H,2),Z16);
Z36:=CROSS(C,Z26 )AND 漲停10;
H3:=IF(BARSLAST(ZB)>0 AND BARSLAST(ZB)<190,REF(H,BARSLAST(ZB)),DRAWNULL),LINETHICK1,COLORGREEN;
{STICKLINE(CURRBARSCOUNT>=1,H3,H3,-1,0),,COLOR7CAE39,NODRAW;}
DRAWTEXT(ISLASTBAR,H3,'--炸'),COLOR7CAE39;
BK:=BARSLAST(CURRBARSCOUNT=CONST(BARSLAST(FILTER(H3,3)))+1);
{DT:=REF(REF(H,1),BK),DOTLINE,COLORGREEN;}
STICKLINE(BK,H3,H3,-1,0),COLOR7CAE39;
{DT1:=REF(H3,BK),DOTLINE,COLORGREEN;};
快線:MA(CLOSE,6),COLORWHITE,LINETHICK1;
慢線:MA(CLOSE,18),COLORYELLOW,LINETHICK1;
生命線:MA(CLOSE,89),COLORRED,LINETHICK2;
DRAWTEXT(CROSS(快線,慢線) AND REF(CLOSE,1)>快線 AND VOL/REF(VOL,1)>1,LOW,'買入');
DRAWTEXT(CROSS(快線,(CLOSE,1)) AND (CLOSE,1)>慢線 ,HIGH,'減倉');
{MA01 : MA(CLOSE,P1);
MA02 : MA(CLOSE,P2);
MA03 : MA(CLOSE,P3);
MA04 : MA(CLOSE,P4);
MA05 : MA(CLOSE,P5);
MA06 : MA(CLOSE,P6);
MA07 : MA(CLOSE,P7);
MA08 : MA(CLOSE,P8);}
X_1X:=(C+L+H)/3;
X_2X:=EMA(X_1X,6);
X_3X:=EMA(X_2X,5);
B點:=CROSS(X_2X,X_3X);
S點:=CROSS(X_3X,X_2X);
持股:=B點>0 AND REF(B點,1)>0;
訊號:=IF( B點,2,IF(S點,-1, IF(持股,1,0)));
DRAWICON(CROSS(X_2X,X_3X),L*0.98,7);{B}
DRAWICON(CROSS(X_3X,X_2X),H*1.02,8);{S};