TYP:=(HIGH+LOW+CLOSE)/3;
CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14)),COLORMAGENTA;
DIF:=(EMA(CLOSE,12)-EMA(CLOSE,26))/(0.015*AVEDEV(TYP,14)),COLORYELLOW;
DEB:=EMA(DIF*(0.015*AVEDEV(TYP,14)),9)/(0.015*AVEDEV(TYP,14)),COLORCYAN;
MACC:=(DIF-DEB)*4,COLORSTICK;
CCI1:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14)),COLORMAGENTA;
大跌:=CCI<REF(CCI,1) AND DIF>REF(DIF,1) AND CCI<DIF AND DIF>100,COLORGREEN;
DRAWTEXT(大跌 AND COUNT(大跌,5)=1, H+3,''大跌''),COLORGREEN;
DRAWTEXT(CROSS(DEB,CCI) AND COUNT(CROSS(DEB,CCI),5)=1, H+10,''賣(mài)''),COLORLIBLUE;
高空:=CCI>REF(CCI,1) AND DIF>REF(DIF,1) AND CCI>DIF AND DIF>100,COLORBLUE;
DRAWTEXT(CCI>REF(CCI,1) AND DIF>REF(DIF,1) AND CCI>DIF AND DIF>100, H+8,''高空''),COLORBLUE;
DRAWTEXT(CROSS(CCI,DIF) AND DEB>DIF AND COUNT(CROSS(CCI,DIF),5)=1, H+6,''反彈賣(mài)''),COLORLIRED;
B1:=MA(C,1);
B2:=SMA(SMA(SMA(B1,2,1),2,1),2,1);
SMA2:=MA(B2,3);
停損下限:IF(LLV(MA(B2,8),3)<B2,LLV(MA(B2,8),3),B2),NODRAW;
IF(B2>SMA2,B2,DRAWNULL),COLORRED,LINETHICK4;
IF(B2<SMA2,B2,DRAWNULL),COLORGREEN,LINETHICK4;
B11:=C<REF(C,4);
NT0:=BARSLASTCOUNT(B11);
A11:=C>REF(C,4);
NT:=BARSLASTCOUNT(A11);
TJ21:=NT0=9 ;
TJ12:=NT=9;
TJ13:=ISLASTBAR AND BETWEEN(NT,5,8);
DRAWTEXT(NT=9,H*1.002,''9''),COLORGREEN;
TJ23:=ISLASTBAR AND BETWEEN(NT0,5,8);
DRAWTEXT(NT0=9,L*0.997,''9''),COLORMAGENTA;
快:=100*(CLOSE-REF(CLOSE,12))/REF(CLOSE,12),COLORRED;
慢:=MA(快,5),COLORLIRED,LINETHICK3;
Q2:=(CLOSE-LLV(LOW, 18))/(HHV(HIGH, 18)-LLV(LOW, 18))*100;
Q3:=SMA(Q2, 9, 1);
Q4:=SMA(Q3, 3, 1);
長(zhǎng)趨勢(shì):=3*Q3-2*Q4,COLORRED,LINETHICK3;
空:=長(zhǎng)趨勢(shì)<REF(長(zhǎng)趨勢(shì),1) ,NODRAW,COLORGREEN;
多:=長(zhǎng)趨勢(shì)>=REF(長(zhǎng)趨勢(shì),1) {AND 斜率>0.6} ,NODRAW,COLORMAGENTA;
持倉(cāng):=多 OR (長(zhǎng)趨勢(shì)>REF(長(zhǎng)趨勢(shì),1) AND 快>=慢) ,NODRAW ;
MID:=(3*CLOSE+LOW+OPEN+HIGH)/6;
牛線:= (20*MID+19*REF(MID,1)+18*REF(MID,2)+17*REF(MID,3)+16*REF(MID,4)+15*REF(MID,5)+14*REF(MID,6)+13*REF(MID,7)+12*REF(MID,8)+11*REF(MID,9)+10*REF(MID,10)+9*REF(MID,11)+8*REF(MID,12)+7*REF(MID,13)+6*REF(MID,14)+5*REF(MID,15)+4*REF(MID,16)+3*REF(MID,17)+2*REF(MID,18)+REF(MID,20))/210,COLORGREEN{COLORRED};
馬線:=MA(牛線,6),COLORMAGENTA{COLORYELLOW};
A:=MAX(MA(C,60),MA(C,120));
B:=MIN(MA(C,60),MA(C,120));
買(mǎi)多:(多 OR 持倉(cāng)) AND 快>=REF(快,1) AND NOT(空){AND 斜率B>=0} ,NODRAW,COLORRED;
買(mǎi)空A:=( 空 AND 快<REF(快,1)) AND NOT(買(mǎi)多),NODRAW,COLORGREEN;
持多:(C>牛線 OR C>A OR COUNT(買(mǎi)多,5)>=3) AND NOT(買(mǎi)空A) AND 慢>=REF(慢,1),NODRAW,COLORMAGENTA;
買(mǎi)空:買(mǎi)空A AND NOT(買(mǎi)多),NODRAW,COLORGREEN;
持空:(C<馬線 OR 買(mǎi)空 OR 空) AND 快<REF(快,1) AND B2<SMA2 AND NOT(持多),NODRAW,COLORCYAN;
賣(mài)絕:IF(空 AND B2<SMA2 AND NOT(持多) ,1,0),NODRAW,COLORCYAN,LINETHICK3;
OK:=REF(CLOSE,1);
RSI1:=SMA(MAX(CLOSE-OK,0),7,1)/SMA(ABS(CLOSE-OK),7,1)*100,COLORWHITE;
RSI2:=SMA(MAX(CLOSE-OK,0),7,1)/SMA(ABS(CLOSE-OK),7,1)*100,COLORWHITE;
FS:=SMA(MAX(CLOSE-OK,0),7,1)/SMA(ABS(CLOSE-OK),7,1)*100,COLORRED,DOTLINE;
RSI4:=SMA(FS,7,1),LINETHICK1,COLORWHITE;
趨勢(shì)A:=MA(((CLOSE-LLV(LOW,48))/(HHV(HIGH,48)-LLV(LOW,48))*50),17)+9,COLORFFFFFF;
趨勢(shì)B:=MA(((CLOSE-LLV(LOW,53))/(HHV(HIGH,53)-LLV(LOW,53))*50),17)+9,COLOR3377DD;
趨勢(shì)C:=EMA(((CLOSE-LLV(LOW,38))/(HHV(HIGH,38)-LLV(LOW,38))*50),17)+18,COLORYELLOW,LINETHICK1;
A1:=MA(趨勢(shì)A,7)*1.372,COLORGREEN,LINETHICK1;
A2:=A1*1.0887;
A3:=(1.5*(趨勢(shì)B+RSI4)-(A2+A1))+12,COLORGREEN,LINETHICK1,DOTLINE;
漲:=IF((CROSS(RSI2,RSI4) OR CROSS(RSI2,A3) AND A3<38 AND RSI1<51),48,38),COLORBLUE,LINETHICK1;
買(mǎi)進(jìn)A:=IF(EXIST(漲=48,8)AND FS>47 AND FS>REF( FS,2),1,0),COLORMAGENTA,NODRAW,LINETHICK2;
UPR:BBI+11*STD(BBI,5);
DWN:BBI-11*STD(BBI,5);
買(mǎi)進(jìn):買(mǎi)進(jìn)A AND COUNT(買(mǎi)進(jìn)A,5)=1,COLORMAGENTA,NODRAW,LINETHICK2;
STICKLINE(買(mǎi)進(jìn),L,L-14,5,0),COLORYELLOW;
STICKLINE(買(mǎi)進(jìn),L,L-12,3,0),COLORMAGENTA;
DRAWTEXT(買(mǎi)進(jìn) AND COUNT(買(mǎi)進(jìn),3)=1, L-16, ''買(mǎi)多''),COLORRED;
STICKLINE(買(mǎi)空 AND COUNT(買(mǎi)空,6)=1,L,L-14,5,0),COLORYELLOW;
STICKLINE(買(mǎi)空 AND COUNT(買(mǎi)空,6)=1,L,L-12,3,0),COLORBLUE;
DRAWTEXT(買(mǎi)空 AND COUNT(買(mǎi)空,6)=1, L-16, ''買(mǎi)空''),COLORLIBLUE;
|