{股價隧道30 主圖疊加}
RM3:(REF(MA(C,3),1))*0.998,COLORRED;
IF(MA(CLOSE,5)<REF(MA(CLOSE,5),1),RM3,DRAWNULL),COLORFFF000;
V1:=MA(CLOSE,3);
V2:=MA(CLOSE,2*3);
V3:=MA(CLOSE,3*3);
V4:=MA(CLOSE,4*3);
V5:=MA(CLOSE,5*3);
V6:=MA((V1+V2+V3+V4+V5)/5,5);
隧DM:=IF(HOUR=0,DMA((V1+V2+V3+V4+V5)/5,5)*(1+6.5/100),DRAWNULL),COLOR00FFFF,DOTLINE;
上分軌:=IF(HOUR=0,V6*(1+6.5/100),V6*(1+3.5/100));
下分軌:=IF(HOUR=0,V6*(1-6.5/100),V6*(1-3/100));
中線:=(上分軌+下分軌)/2,COLOR00FF00;
上賣:(上分軌+中線)/2,COLORAAAAAA,DOTLINE;
IF(上賣>REF(上賣,1),上賣,DRAWNULL),COLORRED,DOTLINE,LINETHICK1;
下買:(下分軌+中線)/2,COLORAAAAAA,DOTLINE;
IF(下買>REF(下買,1),下買,DRAWNULL),COLORRED,DOTLINE,LINETHICK1;
IF(H>=上賣 ,上賣,DRAWNULL),POINTDOT,COLORWHITE,LINETHICK4;
一:C*1.012,NODRAW,COLORRED;
二:C*1.022,NODRAW,COLOR00FFFF;
三:C*1.032,NODRAW,COLORWHITE;
四:C*1.042,NODRAW,COLOR00FFFF;
五:C*1.052,NODRAW,COLORGREEN;
FH:100*(H-REF(C,1))/REF(C,1),COLOR88AAFF,NODRAW;{當天最高漲幅}
F:=100*(C-REF(C,1))/REF(C,1);
TT2:=DMA((((HIGH + LOW) + (CLOSE * 2)) / 4.15),0.9);
TT1:=REF(EMA(TT2,3),1);
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
今小昨:=IF(C<REF(O,1) AND F<0,1,0);
P1:=今小昨;
今小前:=IF(C<REF(O,2) AND F<0,1,0);
P2:=今小前;
STICKLINE(P1=0 AND REF(P1,1)=1 AND P2=0 AND REF(P2,1)=1,OPEN,CLOSE,1,0),COLORMAGENTA;
STICKLINE(P1=1 AND REF(P1,1)=0 AND P2=1 AND REF(P2,1)=0,OPEN,CLOSE,1,0),COLORAAAAAA;
A1:=CLOSE;
A2:=OPEN;
STICKLINE(A1<A2 AND F<-2.9 AND F>-5,A1+(A2-A1)/3,A1+(A2-A1)/3,1,0),COLORRED;
STICKLINE(A1<A2 AND F<-2.9 AND F>-5,A1+2*(A2-A1)/3,A1+2*(A2-A1)/3,1,0),COLORRED;
STICKLINE(A1<A2 AND F<=-5 AND F>-7,A1+(A2-A1)/2,A1+(A2-A1)/2,1,0),COLORRED;
STICKLINE(A1<A2 AND F<=-7 AND F>-10,A1+2*(A2-A1)/3,A1+(A2-A1)/3,3,1),COLORRED;
STICKLINE(A1<A2 AND F<=-9.9,A2,A1,3,0),COLOR00FF00;
STICKLINE(A1>A2 AND F>2.9 AND F<5,A2+(A1-A2)/3,A2+(A1-A2)/3,1,0),COLORYELLOW;
STICKLINE(A1>A2 AND F>2.9 AND F<5,A2+2*(A1-A2)/3,A2+2*(A1-A2)/3,1,0),COLORYELLOW;
STICKLINE(A1>A2 AND F>=5 AND F<7,A2+(A1-A2)/2,A2+(A1-A2)/2,1,0),COLORYELLOW;
STICKLINE(A1>A2 AND F>=7 AND F<10,A2+2*(A1-A2)/3,A2+(A1-A2)/3,1,1),COLORYELLOW;
STICKLINE(A1>A2 AND F>=9.9,A1,A2,1,0),COLORYELLOW;
STICKLINE(F>7,C,O,2.2,0),COLORFFFFFF;{大白K線}
{出黃頭;}
STICKLINE(H>REF(C,1)*1.032,H*1.005,H*1.006,0.5,0),COLORYELLOW,LINETHICK5;
{CCI桔紅點}
IF(CCI<-80 AND {CCI>REF(CCI,1)}F<0,L/1.01,DRAWNULL),POINTDOT,COLOR8888FF,LINETHICK1;
DRAWNUMBER(CCI<-100 AND CCI>-128 AND REF(CCI,1)<-128,L/1.01,INTPART(CCI)),COLOR8888FF;
{分時圖日期分隔符}
IF(HOUR=15,H*1.008,DRAWNULL),POINTDOT,COLORFFFAAA,LINETHICK9;
IF(HOUR=15,H*1.008,DRAWNULL),POINTDOT,COLOR000FFF,LINETHICK5;
IF(HOUR=15,H*1.005,DRAWNULL),POINTDOT,COLORFFF000,LINETHICK9;
IF(HOUR=15,H*1.005,DRAWNULL),POINTDOT,COLOR000FFF,LINETHICK5;
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,'↖買'),COLORYELLOW;
STICKLINE(買,OPEN,CLOSE,2,0),COLORYELLOW;
{紫陽買信號}
XG:=H>=HHV(H,5);
TF:=BARSLAST(XG);
L1:=IF(L<(0.989*REF(L,TF)),1,0);
L11:=L1 AND COUNT(L1,TF)<2 AND TF<30 AND TF>0;
T2:=BARSLAST(L11);
L2:=IF(L<(0.989*REF(L,T2)),1,0);
L22:=L2 AND COUNT(L2,T2)<2 AND T2<30 AND TF>0 AND T2>0;
T3:=BARSLAST(L22);
L3:=IF(L<(0.989*REF(L,T3)),1,0);
L33:=L3 AND COUNT(L3,T3)<2 AND T3<30 AND TF>0 AND T2>0 AND T3>0 ;
ZY:=P1=0 AND REF(P1,1)=1 AND P2=0 AND REF(P2,1)=1;
跌后ZY:=ZY AND (REF(L22,1) OR REF(L33,1) OR REF(L33,2) ) ;
DRAWTEXT(跌后ZY,LOW,'買'),COLORRED;
{出標志}
F1:=100*(C-REF(C,1))/REF(C,1);
HT:=(H>REF(C,1)*1.032) AND C>=O ;
BZ1A:=HT AND H>REF(H,2);
BZ1:=BZ1A AND COUNT(BZ1A,3)=1;
一字:=C=O AND C=L AND C=H AND F1>9.4;
BZ2:=((BZ1 AND REF(BZ1,1)=0) OR REF(一字,1)=1)AND 一字=0 ;
DRAWTEXT(BZ2,L*0.99,'標'),COLORYELLOW;