MA3:MA(C,3);
MA5:MA(C,5);
MA7:MA(C,7);
MA13:MA(C,13);
AA:=MA((2*C+H+L)/4,5);
通道1:AA*1.02;
通道2:AA*0.98;
壓力線:MA(C,20)+3.1*STD(C,25),LINETHICK2,COLORRED,NODRAW;
M3:ATAN((MA(C,3)/REF(MA(C,3),1)-1)*100)*57.3,COLORWHITE,NODRAW;
M5:ATAN((MA(C,5)/REF(MA(C,5),1)-1)*100)*57.3,COLORYELLOW,NODRAW;
M7:ATAN((MA(C,7)/REF(MA(C,7),1)-1)*100)*57.3,COLORFF00FF,NODRAW;
M13:ATAN((MA(C,13)/REF(MA(C,13),1)-1)*100)*57.3,COLOR00FF00,NODRAW;
DRAWICON(H>=壓力線,H*1.03,6);
STICKLINE(通道2>=REF(通道2,1),L,H,0,1),COLORRED;
STICKLINE(通道2>=REF(通道2,1),C,O,3.2,2),COLORRED;
STICKLINE(通道2<REF(通道2,1),L,H,0,1),COLORGREEN;
STICKLINE(通道2<REF(通道2,1),C,O,3.2,2),COLORGREEN;
STICKLINE(通道2>=REF(通道2,1),O,C,3.2,0),COLORGREEN;
STICKLINE(通道2<REF(通道2,1),O,C,3.2,0),COLORRED;
STICKLINE((C>=O) AND (通道2<REF(通道2,1)),C,O,3.2,2),COLORGREEN;
STICKLINE((C>=O) AND (通道2>=REF(通道2,1)),C,O,3.2,2),COLORRED;
STICKLINE((C<O) AND (通道2<REF(通道2,1)),C,O,3.2,0),COLORGREEN;
STICKLINE((C<O) AND (通道2>=REF(通道2,1)),C,O,3.2,0),COLORRED;
漲停1:=IF((C-REF(C,1))*100/REF(C,1)>=(10-0.01*100/REF(C,1)) AND C=H,1,0);
漲停:=C>=REF(C,1)*1.07;
STICKLINE(漲停1,O,C,2.5,0),COLORFF00FF;
STICKLINE(漲停1,H,L,0,1),COLORFF00FF;
STICKLINE(C,REF(O,BARSLAST(漲停)),REF(O,BARSLAST(漲停)),6,-1),COLOR8080FF;
STICKLINE(C,REF(C,BARSLAST(漲停)),REF(C,BARSLAST(漲停)),6,-1),COLORYELLOW;
低不破價(jià):=REF(C,BARSLAST(漲停));
漲停不破:=BARSLAST(漲停)<11 AND (LLV(C,BARSLAST(漲停))>低不破價(jià) OR LLV(C,BARSLAST(漲停))=低不破價(jià));
DRAWTEXT(BARSLAST(漲停)=1 AND 漲停不破,低不破價(jià)*0.98,'1'),COLORGREEN;
DRAWTEXT(BARSLAST(漲停)=2 AND 漲停不破,低不破價(jià)*0.98,'2'),COLORGREEN;
DRAWTEXT(BARSLAST(漲停)=3 AND 漲停不破,低不破價(jià)*0.98,'3'),COLORGREEN;
DRAWTEXT(BARSLAST(漲停)=4 AND 漲停不破,低不破價(jià)*0.98,'4'),COLORGREEN;
DRAWTEXT(BARSLAST(漲停)=5 AND 漲停不破,低不破價(jià)*0.98,'5'),COLORGREEN;
DRAWTEXT(BARSLAST(漲停)=6 AND 漲停不破,低不破價(jià)*0.98,'6'),COLORGREEN;
DRAWTEXT(BARSLAST(漲停)=7 AND 漲停不破,低不破價(jià)*0.98,'7'),COLORGREEN;
DRAWTEXT(BARSLAST(漲停)=8 AND 漲停不破,低不破價(jià)*0.98,'8'),COLORGREEN;
DRAWTEXT(BARSLAST(漲停)=9 AND 漲停不破,低不破價(jià)*0.98,'9'),COLORGREEN;
DRAWTEXT(BARSLAST(漲停)=10 AND 漲停不破,低不破價(jià)*0.98,'10'),COLORGREEN;
跌停:=IF((REF(C,1)-C)*100/REF(C,1)>=(10-0.01*100/REF(C,1)) AND C=L,1,0);
STICKLINE(跌停,O,C,2.5,0),COLORFFFFFF;
STICKLINE(跌停,H,L,0,1),COLORFFFFFF;
Z:=ISLASTBAR;
DRAWTEXT(REF(C,2)>REF(O,2) AND REF(C,1)>REF(O,1) AND C>O AND Z,0.98*REF(H,1),'①乾:陽極,防變'),COLORFF00FF;
DRAWTEXT(REF(C,2)>REF(O,2) AND REF(C,1)>REF(O,1) AND C<=O AND Z,0.98*REF(H,1),'②兌:陽減,調(diào)整'),COLORFFFF00;
DRAWTEXT(REF(C,2)>REF(O,2) AND REF(C,1)<=REF(O,1) AND C>O AND Z,0.98*REF(H,1),'③離:陽光,關(guān)注'),COLOR00FFFF;
DRAWTEXT(REF(C,2)>REF(O,2) AND REF(C,1)<=REF(O,1) AND C<=O AND Z,0.98*REF(H,1),'④震:繼陰,空倉(cāng)'),COLORFF0000;
DRAWTEXT(REF(C,2)<=REF(O,2) AND REF(C,1)>REF(O,1) AND C>O AND Z,0.98*REF(H,1),'⑤巽:繼陽,持股'),COLORFF00FF;
DRAWTEXT(REF(C,2)<=REF(O,2) AND REF(C,1)>REF(O,1) AND C<=O AND Z,0.98*REF(H,1),'⑥坎:陰風(fēng),看跌'),COLORFF0000;
DRAWTEXT(REF(C,2)<=REF(O,2) AND REF(C,1)<=REF(O,1) AND C>O AND Z,0.98*REF(H,1),'⑦艮:陰減,反彈'),COLOR00FFFF;
DRAWTEXT(REF(C,2)<=REF(O,2) AND REF(C,1)<=REF(O,1) AND C<=O AND Z,0.98*REF(H,1),'⑧坤:陰極,待轉(zhuǎn)'),COLORFF0000;
VAR1:=C>REF(C,1) AND C>REF(C,2);
VAR2:=REF(VAR1,1) AND C<=REF(C,1) AND C>=REF(C,2);
VAR3:=REF(VAR2,1) AND C>=REF(C,1) AND C<=REF(C,2);
VAR4:=REF(VAR3,1) AND C<=REF(C,1) AND C>=REF(C,2);
VAR5:=REF(VAR4,1) AND C>=REF(C,1) AND C<=REF(C,2);
VAR6:=REF(VAR5,1) AND C<=REF(C,1) AND C>=REF(C,2);
VAR7:=REF(VAR6,1) AND C>=REF(C,1) AND C<=REF(C,2);
VAR8:=REF(VAR7,1) AND C<=REF(C,1) AND C>=REF(C,2);
VAR9:=REF(VAR8,1) AND C>=REF(C,1) AND C<=REF(C,2);
VARA:=REF(VAR9,1) AND C<=REF(C,1) AND C>=REF(C,2);
VARB:=REF(VARA,1) AND C>=REF(C,1) AND C<=REF(C,2);
VARC:=REF(VARB,1) AND C<=REF(C,1) AND C>=REF(C,2);
VARD:=C<REF(C,1) AND C<REF(C,2);
VARE:=REF(VARD,1) AND C>=REF(C,1) AND C<=REF(C,2);
VARF:=REF(VARE,1) AND C<=REF(C,1) AND C>=REF(C,2);
VAR10:=REF(VARF,1) AND C>=REF(C,1) AND C<=REF(C,2);
VAR11:=REF(VAR10,1) AND C<=REF(C,1) AND C>=REF(C,2);
VAR12:=REF(VAR11,1) AND C>=REF(C,1) AND C<=REF(C,2);
VAR13:=REF(VAR12,1) AND C<=REF(C,1) AND C>=REF(C,2);
VAR14:=REF(VAR13,1) AND C>=REF(C,1) AND C<=REF(C,2);
VAR15:=REF(VAR14,1) AND C<=REF(C,1) AND C>=REF(C,2);
VAR16:=REF(VAR15,1) AND C>=REF(C,1) AND C<=REF(C,2);
VAR17:=REF(VAR16,1) AND C<=REF(C,1) AND C>=REF(C,2);
VAR18:=REF(VAR17,1) AND C>=REF(C,1) AND C<=REF(C,2);
VAR19:=REF(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,1) AND VAR1;
DRAWICON(VAR19,L*0.99,9);
VAR1A:=REF(VAR1 OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 OR VAR8 OR VAR9 OR VARA OR VARB OR VARC,1) AND VARD;
DRAWICON(VAR1A,H*1.01,4);
SYX1:=C>=O AND H>C*1.02;
SYX2:=C<O AND H>O*1.02;
SYX3:=C<O AND L>REF(C,1) AND H>REF(C,1)*1.03;
上影線:=SYX1 OR SYX2 OR SYX3;
DRAWTEXT(上影線,H,'上影'),COLORWHITE;