Z1:=STRCAT(HYBLOCK,' ');
Z2:=STRCAT(Z1,DYBLOCK);
Z3:=STRCAT(Z2,' ');
DRAWTEXT_FIX(ISLASTBAR,0,0,0,STRCAT(Z3,GNBLOCK)),COLORC6F2FF;
AA:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,30))/MA(CLOSE,30);
濟安線:=DMA((2*CLOSE+LOW+HIGH)/4,AA),LINETHICK1,COLORFFFFFF;
CC:=(CLOSE/濟安線);
MA1:=MA(CC*(2*CLOSE+HIGH+LOW)/4,3);
MAAA:=((MA1-濟安線)/濟安線)/3;
TMP:MA1-MAAA*MA1 {DOTLINE},COLORFFFFFF LINETHICK2 {NODRAW};
M3:=MA(C,3) COLORFFFFFF LINETHICK3;
M5:MA(C,5) COLOR00FFFF DOTLINE;
M10:MA(C,10)COLORFF00FF LINETHICK3;
M20:MA(C,20)COLOR33CCFF; {F999FF POINTDOT LINETHICK4 C6F2FF}
M30:MA(C,30)COLOR00FF00 {DOTLINE} LINETHICK1;
M60:=MA(C,60)COLORCYAN {DOTLINE} LINETHICK1;
M117:=MA(C,117)COLORCCCFFF;
M233:=MA(C,233) COLORRED CIRCLEDOT;
IF(M20-M30>-0.15,M30,DRAWNULL),LINETHICK1 COLOR00FF00;
IF(M60/H<1.2,M60,DRAWNULL),LINETHICK2 COLORFFCC66;
IF(M117/H<1.2,M117,DRAWNULL),POINTDOT LINETHICK4 COLORFFCCFF{00CC66};
IF(M233/H<1.2,M233,DRAWNULL), POINTDOT LINETHICK4 COLORRED;
AAA:=(3*C+H+L+O)/6;
VAR1:=(8*AAA+7*REF(AAA,1)+6*REF(AAA,2)+5*REF(AAA,3)+4*REF(AAA,4)+3*REF(AAA,5)
+2*REF(AAA,6)+REF(AAA,8))/36,COLORFF00FF;
VAR3:=(LLV(VAR1,2)+LLV(VAR1,4)+LLV(VAR1,8))/3;
VAR5:(LLV(VAR3,2)+LLV(VAR3,4)+LLV(VAR3,8))/3,COLOR00FFFF LINETHICK2;
VV:=(3*C+H+L+O)/6{(C+L+H)/3};
Y0:=SMA(XMA(VV,30),3,1)COLORFFFFFF POINTDOT LINETHICK2;
Y1:Y0*1.1 COLORCYAN{C6F2FF} DOTLINE;
Y2:Y0*1.05 COLOR33FFCC{808000} DOTLINE;
Y:Y0,COLORFFFFFF POINTDOT LINETHICK2;
Y3:Y0*0.95 COLORFFFCCC DOTLINE;
Y4:Y0*0.9 COLORC6F2FF DOTLINE; {808000 0099C0 0088CC棕色 1088FF 0088 5088FFC}
角5:ATAN((M5/REF(M5,1)-1)*100)*180/3.1416 COLORFFFFFF NODRAW;
角10:ATAN((M10/REF(M10,1)-1)*100)*180/3.1416 COLORFFCCFF NODRAW;
角度:=ATAN((Y3/REF(Y3,3)-1))*57.3,COLOR00FFCC NODRAW;
深度中:=100*(Y-M3)/M3,COLOR00FFFF NODRAW;
乖離:=100*(M3-M30)/M3,COLOR00FF00 NODRAW;
DRAWTEXT(FILTER((BARSLAST(CROSS(Y,M60))<3 AND 角度>=0.4 AND M3<Y),5),(Y*1.04),'●牛抬頭')COLOR33FFCC;
DRAWTEXT((CROSS(Y4,M60) AND M3<Y),(Y4*0.98),'●黑馬')COLORCYAN;
{DRAWTEXT((COUNT(C>M10,10) OR C>VAR5,10)>=9 AND CROSS(M10,M60),
(H*1.03),'●●●●拐點')COLOR00FF00;}
DRAWTEXT((COUNT(M10>=REF(M10,1),10)=9 AND M10<REF(M10,1)),(M10*1.006),'●●●●●')COLORFFFFFF;
{DRAWTEXT(FILTER(((角度>=1) AND L<Y),6),(Y1* 1.02),'●>1')COLOR1088FF;}
DRAWTEXT(FILTER(((角度>=1) AND L<Y),6),(Y4+0.05),'●>1')COLOR1088FF;
DRAWTEXT((CROSS(M3,M5)),(H*1.015),'3上') COLOR00FFFF;
DRAWTEXT((CROSS(M5,M3)),(H*1.016),'3下') COLOR00FF00;
買線:=EMA(C,2);
賣線:=EMA(SLOPE(C,21)*20+C,42);
BU:=CROSS(買線,賣線);
SEL:=CROSS(賣線,買線);
DRAWICON(BU,L*0.99,17); {1,9,13,14,16,17,23,25,27}
DRAWICON(CROSS(Y4,C),L*0.99,23);
DRAWICON(CROSS(M10,M20),M20*0.99,42);
DRAWICON(CROSS(M10,M30),M10,42);
DRAWICON(CROSS(M20,M30),M30*0.998,1);
DRAWICON(CROSS(M10,M60),M60*0.99,42);
DRAWICON(CROSS(M20,M60) AND M10>M60,M60*0.998,38);
DRAWICON(CROSS(M30,M60) AND M10>M60,M60*0.998,38);
DRAWICON(CROSS(M10,M117) AND M10>M60,M10*0.99,42);
DRAWICON(CROSS(M10,M233) AND M10>M60,M10*0.998,42);
DRAWICON(CROSS(M60,M117) AND M10>M60,M60*0.998,13);
DRAWICON(CROSS(M60,M233) AND M10>M60,M60*0.998,13);
DRAWICON(CROSS(M10,M20) AND M20>M60, H*1.015,16);
DRAWICON(CROSS(M10,M30) AND M30>M60, H*1.015,16);
DRAWICON(CROSS(M10,M60), H*1.015,16);
DRAWICON(CROSS(M10,M117), H*1.015,16);
DRAWICON(CROSS(M10,M233), H*1.015,16);
DRAWICON(CROSS(M5,Y2), H*1.015,39); DRAWICON(CROSS(M5,Y2), H*1.03,39);
DRAWICON(CROSS(M10,Y2), H*1.015,39);
ZC:="XX.主力持倉";ZM:="XX.主力籌碼集中度"; {00BB00 00FFCC}
STICKLINE((CROSS(M10,M3)),O,C,1,0),COLORBLUE ;
W1:=COUNT(C>M10,9)=8 OR COUNT(角10>0,10)=10 OR BARSLAST(C/REF(C,1)>1.092)<=7;
STICKLINE((CROSS(M10,C) AND W1),O,C,0.8,0),COLORBLUE;
{STICKLINE(CROSS(M10,M60),O,C,0.5,0),COLORRED;}
STICKLINE(M5>Y2,O,C,0.8,0),COLORFF999F;
STICKLINE(CROSS(Y4,C),O,C,1,0),COLORRED;
STICKLINE(FILTER(M3/M10>1.04 AND L/M10>1.015 AND M10<Y2,4),
(L-M10)*0.6+M10,M10+0.1,0.1,0),COLORFFFFFF;
STICKLINE(C/REF(C,1)>1.093 AND C=H,C,O,0.1,1),COLORFFFFFF;
A:=BARSCOUNT(C);
AH:=HHV(H,200);
AL:=LLV(L,200);
A0:=(AH-AL)/40;
B0:=L-A0;
{STICKLINE((A+0)/34=FLOOR((A+0)/34),B0,B0-1.5*A0,2,0),COLOR00FFFF;} {F00FF0}
STICKLINE((A+0)/34=FLOOR((A+0)/34),Y4,Y4*0.98,2,0),COLORFFCCFF;
DRAWTEXT((A+0)/34=FLOOR((A+0)/34),Y4*0.98,'時窗/變盤'),COLOR00FFFF;
N:=75;P:=5;
A1:=REF(L,P)=LLV(L,2*P+1);
B1:= FILTER(A1,P);
C1:=BACKSET(B1,P+1);
D1:=FILTER(C1,P);
E1:=BACKSET(ISLASTBAR,BARSLAST(D1)+1);
F1:=E1>REF(E1,1);
{短支:DRAWLINE(D1,L,F1,L,1),COLORFFFFFF,DOTLINE;}
P1:=5;
A2:=REF(LOW,P1)=LLV(LOW,2*P1+1);
B2:=FILTER(A2,P1);
C2:=BACKSET(B2,P1+1);
D2:=FILTER(C2,P1);{低點COLOR99CCFF;}
E2:=BACKSET(ISLASTBAR,BARSLAST(D2)+1);
F2:=E2>REF(E2,1);
支撐線:=DRAWLINE(D2,LOW,F2,LOW,1),COLOR1066FF LINETHICK1;
DRAWICON(C<MA(C,250) AND C>MA(C,10) AND REF(C,1)<REF(O,1)*0.97 AND
C/O>1.03 AND V/CAPITAL>0.03,L*0.97,9);