A:=MA(CLOSE,17)+ABS(MA(CLOSE,17)-REF(MA(CLOSE,17),1));
B:=MA(CLOSE,17)+MA(CLOSE,17)-REF(MA(CLOSE,17),1);
分水嶺:=IF(MA(CLOSE,17)<B,B,MA(CLOSE,17)),COLORFF00FF,LINETHICK1;
PMA:=分水嶺;
DD1:=分水嶺<REF(分水嶺,1);
{IF(DD1,分水嶺,DRAWNULL),COLOR00FF00,LINETHICK1; }
操作線:=分水嶺-(EMA(C,3)-分水嶺),COLOR00FFFF,LINETHICK1;
S:=(PMA>操作線);
{IF(S,分水嶺,DRAWNULL),COLOR00FF00,POINTDOT,LINETHICK1; }
PM:=MA(C,5),COLORFFFFCC,LINETHICK1;
{IF(PM>REF(PM,1),PM,DRAWNULL),COLORRED,LINETHICK1;
IF(PM=REF(PM,1),PM,DRAWNULL),COLORRED;
IF(PM<REF(PM,1),PM,DRAWNULL),COLORFF9900,LINETHICK1;}
DRAWTEXT(CROSS(分水嶺,操作線),分水嶺-0.1,'三底背離');
A1:=BARSLAST(REF(CROSS("MACD.DIF","MACD.DEA"),1));
B1:=REF(C,A1+1)>C AND REF("MACD.DIF",A1+1)<"MACD.DIF" AND CROSS("MACD.DIF","MACD.DEA");
DRAWTEXT(B1>0,L-0.02,'M底背離'),COLOR00FFFF;
A2:=BARSLAST(REF(CROSS("KDJ.K","KDJ.D"),1));
B2:=REF(C,A2+1)>C AND REF("KDJ.K",A2+1)<"KDJ.K" AND CROSS("KDJ.K","KDJ.D");
DRAWTEXT(B2,L-0.10,'K底背離'),COLORFF00FF;
A3:=BARSLAST(REF(CROSS("RSI.RSI1","RSI.RSI2"),1));
B3:=REF(C,A3+1)>C AND REF("RSI.RSI1",A3+1)<"RSI.RSI1" AND CROSS("RSI.RSI1","RSI.RSI2");
DRAWTEXT(B3>0,L-0.18,'R底背離'),COLOR0000FF;
C1:=BARSLAST(REF(CROSS("MACD.DEA","MACD.DIF"),1));
D1:=REF(C,C1+1)<C AND REF("MACD.DIF",C1+1)>"MACD.DIF" AND CROSS("MACD.DEA","MACD.DIF");
DRAWTEXT(D1>0,H+0.16,'M頂背離'),COLOR00FF00;
C2:=BARSLAST(REF(CROSS("KDJ.D","KDJ.K"),1));
D2:=REF(C,C2+1)<C AND REF("KDJ.K",C2+1)>"KDJ.K" AND CROSS("KDJ.D","KDJ.K");
DRAWTEXT(D2>0,H+0.08,'K頂背離'),COLORFFFFCC;
C3:=BARSLAST(REF(CROSS("RSI.RSI2","RSI.RSI1"),1));
D3:=REF(C,C3+1)<C AND REF("RSI.RSI1",C3+1)>"RSI.RSI1" AND CROSS("RSI.RSI2","RSI.RSI1");
DRAWTEXT(D3>0,H+0.04,'R頂背離'),COLORFF9900;
零軸:=DYNAINFO(3)*1,COLOR0000FF;
STICKLINE(1,90/100+零軸,90/100+零軸,2,0),COLOR00BBBB;
STICKLINE(1,10/100+零軸,10/100+零軸,2,0),COLOR0000BB;
STICKLINE(1,100/100+零軸,100/100+零軸,2,0),COLORBBBBBB;
STICKLINE(1,50/100+零軸,50/100+零軸,2,0),COLORFF0000;
STICKLINE(1,0/100+零軸,0/100+零軸,2,0),COLORBBBB00;
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100+50/100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
KK:=零軸+K/100;
DD:=零軸+D/100;
JJ:=零軸+J/100;
EE:=50/100+零軸;
DRAWBAND(KK,RGB(200,0,150),EE,RGB(0,170,120));
DRAWBAND(JJ,RGB(220,0,0),KK,RGB(120,120,170));
DRAWKLINE(H,O,L,C);
AAA:=JJ>=KK AND KK>=EE;
BBB:=JJ>=KK AND KK<EE;
DDD:=JJ<KK AND KK>=EE;
EEE:=JJ<KK AND KK<EE;
STICKLINE(AAA,H,L,0,0),COLOR0000FF;
STICKLINE(BBB,H,L,0,0),COLORFF00FF;
STICKLINE(DDD,H,L,0,0),COLOR00FFFF;
STICKLINE(EEE,H,L,0,0),COLORFFFF00;
STICKLINE(AAA,CLOSE,OPEN,3.2,0),COLOR000099;
STICKLINE(AAA,CLOSE,OPEN,1.8,0),COLOR0000BB;
STICKLINE(AAA,CLOSE,OPEN,1.3,0),COLOR0000DD;
STICKLINE(AAA,CLOSE,OPEN,0.5,0),COLOR0000FF;
STICKLINE(BBB,CLOSE,OPEN,3.2,0),COLOR990099;
STICKLINE(BBB,CLOSE,OPEN,1.8,0),COLORAA00AA;
STICKLINE(BBB,CLOSE,OPEN,1.3,0),COLORDD00DD;
STICKLINE(BBB,CLOSE,OPEN,0.5,0),COLORFF00FF;
STICKLINE(DDD,C,O,3.2,0),COLOR009999;
STICKLINE(DDD,C,O,2.4,0),COLOR00BBBB;
STICKLINE(DDD,C,O,1.0,0),COLOR00DDDD;
STICKLINE(DDD,C,O,0.6,0),COLOR00FFFF;
STICKLINE(EEE,C,O,3.2,0),COLOR999900;
STICKLINE(EEE,C,O,1.6,0),COLORBBBB00;
STICKLINE(EEE,C,O,1.0,0),COLORDDDD00;
STICKLINE(EEE,C,O,0.5,0),COLORFFFF00;
LC:=REF(CLOSE,1);
RSI1:=SMA(MAX(CLOSE-LC,0),3,1)/SMA(ABS(CLOSE-LC),3,1)*100;
SELL2:=(CROSS(88,RSI1));
DRAWTEXT(SELL2,HIGH*1.02,'←賣'),COLOR00FF00;
VB1:=C-REF(C,1);
VB2:=100*EMA(EMA(VB1,6),6)/EMA(EMA(ABS(VB1),6),6);
VB3:=IF(LLV(VB2,2)=LLV(VB2,7) AND COUNT(VB2<0,2) AND CROSS(VB2,MA(VB2,2)),1,0);
VB4:=FILTER(VB3=1,5);
DRAWTEXT(VB4,LOW*0.98,'←買'),COLOR00FFFF;
DRAWTEXT_FIX(1,0,0,0,HYBLOCK);
威廉波段:=100-(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34))*100;
威廉風(fēng)險(xiǎn):=IF(威廉波段>95,(100/100+零軸)-(100/100+零軸)*0.009,100/100+零軸),COLOR00FFFF,LINETHICK0;
DRAWBAND(100/100+零軸,RGB(220,220,0),威廉風(fēng)險(xiǎn),RGB(0,0,0));
WLDB:=IF(威廉波段<5,(0/100+零軸)+(0/100+零軸)*0.009,0/100+零軸),COLORFFFF00,LINETHICK1;
DRAWBAND(WLDB,RGB(0,220,220),0/100+零軸,RGB(0,0,0));
DRAWTEXT_FIX(1,0.05,0.0,0,'【彩色K線標(biāo)識(shí)】★★紅色柱---J大于K并在中軸上★★黃色柱--J小于K并在中軸上★★ '),COLORFFFFFF;
DRAWTEXT_FIX(1,0.05,0.035,0,'【彩色K線標(biāo)識(shí)】★★粉色柱---J大于K并在中軸下★★青色柱--J小于K并在中軸下★★ '),COLOR00FFFF;
DRAWTEXT_FIX(1,0.05,0.07,0,'【彩色三角型標(biāo)識(shí)】★★青色三角形---威廉底部★★黃色三角形--威廉頂部★★ '),COLORFFFF00;
ZGB:VOL*100/HSCOL.HSCOL,NODRAW;
DRAWTEXT(ZGB-REF(ZGB,1)>50,H,'解禁日')COLORGREEN;
MA30生命線:MA(C,30)LINETHICK1,COLORWHITE;
MA60牛熊線:MA(C,60)LINETHICK1,COLORRED;
黃金線:(EMA(C,18)),POINTDOT,LINETHICK5,COLORYELLOW;
MA43神奇線:MA(C,43)POINTDOT,LINETHICK5,COLORGREEN;
_10日漲跌%: (C-REF(CLOSE,10))/REF(CLOSE,10)*100,COLORGREEN,NODRAW;
漲家數(shù):INDEXADV,COLOR0080FF,NODRAW;
跌家數(shù):INDEXDEC,COLORGREEN,NODRAW;
漲停:C+0.05>=(ROUND(REF(C,1)*(100+10*(2-NAMELIKE('ST'))/2))/100),COLOR0080FF,NODRAW;
跌停:C-0.05<=(ROUND(REF(C,1)*(100-10*(2-NAMELIKE('ST'))/2))/100),COLORGREEN,NODRAW;
Z1:=STRCAT(HYBLOCK,' ');
Z2:=STRCAT(Z1,FGBLOCK);
Z3:=STRCAT(Z2,DYBLOCK);
Z4:=STRCAT(Z3,' ');
DRAWTEXT_FIX(ISLASTBAR,0.00,0.99,0,STRCAT(Z4,GNBLOCK)),COLORYELLOW;
TOTAL:=IF(PERIOD=1,5,IF(PERIOD=2,15,IF(PERIOD=3,30,IF(PERIOD=4,60,IF(PERIOD=5,240,1)))));
MTIME:=MOD(FROMOPEN,TOTAL);
CTIME:=IF(MTIME<0.5,TOTAL,MTIME);
VV:=IF(CURRBARSCOUNT=1,VOL*TOTAL/CTIME,V);
N9:=120;
A100:=CONST(HHV(H,N9)-LLV(L,N9))/CONST(HHV(VV,N9));
B100:=CONST(LLV(L,N9))-CONST(HHV(VV,N9))*A100/8;
天數(shù):=10;
STICKLINE(CURRBARSCOUNT=1 && (SETCODE=0 || SETCODE=1),B100+VV*A100/8,B100,-1,-1),COLOR00C0C0;
STICKLINE(C>=O AND CURRBARSCOUNT<=天數(shù),B100+VV*A100/8,B100,3,1),COLOR3232FF;
STICKLINE(C<O AND CURRBARSCOUNT<=天數(shù),B100+VV*A100/8,B100,3,0),COLORFFFF54;
DRAWRECTREL(0,580,100,960,RGB(150,0,0));
DRAWRECTREL(100,580,200,960,RGB(0,150,150));
DRAWRECTREL(200,725,300,960,RGB(150,0,150));
日K:="KD.K"(9,3,3);
日D:="KD.D"(9,3,3);
月K:="KDJ.K#MONTH"(9,3,3);
月D:="KDJ.D#MONTH"(9,3,3);
周K:="KDJ.K#WEEK"(9,3,3);
周D:="KDJ.D#WEEK"(9,3,3);
DRAWTEXT_FIX(ISLASTBAR,0.04,0.60,0,'KDJ '),COLOR00FFFF;
DRAWTEXT_FIX(ISLASTBAR,0.01,0.65,0,'日K='),COLORFFFFFF;
DRAWNUMBER_FIX(ISLASTBAR,0.05,0.65,0,日K),COLORFFFFFF;
DRAWTEXT_FIX(ISLASTBAR,0.01,0.7,0,'日D='),COLORFFFFFF;
DRAWNUMBER_FIX(ISLASTBAR,0.05,0.7,0,日D),COLORFFFFFF;
DRAWTEXT_FIX(ISLASTBAR,0.01,0.75,0,'周K='),COLORFFFFFF;
DRAWNUMBER_FIX(ISLASTBAR,0.05,0.75,0,周K),COLORFFFFFF;
DRAWTEXT_FIX(ISLASTBAR,0.01,0.8,0,'周D='),COLORFFFFFF;
DRAWNUMBER_FIX(ISLASTBAR,0.05,0.8,0,周D),COLORFFFFFF;
DRAWTEXT_FIX(ISLASTBAR,0.01,0.85,0,'月K= '),COLORFFFFFF;
DRAWNUMBER_FIX(ISLASTBAR,0.05,0.85,0, 月K),COLORFFFFFF;
DRAWTEXT_FIX(ISLASTBAR,0.01,0.9,0,'月D='),COLORFFFFFF;
DRAWNUMBER_FIX(ISLASTBAR,0.05,0.9,0,月D),COLORFFFFFF;
日DIF:="MACD.DIF"(12,26,9);
日DEA:="MACD.DEA"(12,26,9);
周DIF:="MACD.DIF#WEEK"(12,26,9);
周DEA:="MACD.DEA#WEEK"(12,26,9);
月DIF:="MACD.DIF#MONTH"(12,26,9);
月DEA:="MACD.DEA#MONTH"(12,26,9);
DRAWTEXT_FIX(ISLASTBAR,0.13,0.60,0,'MACD '),COLOR00FFFF;
DRAWTEXT_FIX(ISLASTBAR,0.11,0.65,0,'日DIF='),COLORFFFFFF;
DRAWNUMBER_FIX(ISLASTBAR,0.155,0.65,0,日DIF),COLORFFFFFF;
DRAWTEXT_FIX(ISLASTBAR,0.11,0.7,0,'日DEA='),COLORFFFFFF;
DRAWNUMBER_FIX(ISLASTBAR,0.155,0.7,0,日DEA),COLORFFFFFF;
DRAWTEXT_FIX(ISLASTBAR,0.11,0.75,0,'周DIF='),COLORFFFFFF;
DRAWNUMBER_FIX(ISLASTBAR,0.155,0.75,0,周DIF),COLORFFFFFF;
DRAWTEXT_FIX(ISLASTBAR,0.11,0.8,0,'周DEA='),COLORFFFFFF;
DRAWNUMBER_FIX(ISLASTBAR,0.155,0.8,0,周DEA),COLORFFFFFF;
DRAWTEXT_FIX(ISLASTBAR,0.11,0.85,0,'月DIF= '),COLORFFFFFF;
DRAWNUMBER_FIX(ISLASTBAR,0.155,0.85,0, 月DIF),COLORFFFFFF;
DRAWTEXT_FIX(ISLASTBAR,0.11,0.9,0,'月DEA='),COLORFFFFFF;
DRAWNUMBER_FIX(ISLASTBAR,0.155,0.9,0,月DEA),COLORFFFFFF;
TYP:=(HIGH+LOW+CLOSE)/3;
日CCI:=(TYP-MA(TYP,84))/(0.015*AVEDEV(TYP,84));
周CCI:=(TYP-MA(TYP,21))/(0.015*AVEDEV(TYP,21));
月CCI:=(TYP-MA(TYP,9))/(0.015*AVEDEV(TYP,9));
DRAWTEXT_FIX(ISLASTBAR,0.235,0.75,0,'CCI'),COLOR00FFFF;
DRAWTEXT_FIX(ISLASTBAR,0.206,0.80,0,'日CCI='),COLORFFFFFF;
DRAWNUMBER_FIX(ISLASTBAR,0.250,0.80,0,日CCI),COLORFFFFFF;
DRAWTEXT_FIX(ISLASTBAR,0.206,0.85,0,'周CCI='),COLORFFFFFF;
DRAWNUMBER_FIX(ISLASTBAR,0.250,0.85,0,周CCI),COLORFFFFFF;
DRAWTEXT_FIX(ISLASTBAR,0.206,0.90,0,'月CCI='),COLORFFFFFF;
DRAWNUMBER_FIX(ISLASTBAR,0.250,0.90,0,月CCI),COLORFFFFFF;
{數(shù)字顯示漲跌停K線天數(shù)}
A1000:=REF(C,1);
漲停A:=IF((C-A1000)*100/A1000>=(10-0.01*100/A1000),1,0);
跌停A:=IF((A1000-C)*100/A1000>=(10-0.01*100/A1000),1,0);
漲停次數(shù):=COUNT(漲停A,BARSSINCE(漲停A)+1);
跌停次數(shù):=COUNT(跌停A,BARSSINCE(跌停A)+1);
DRAWNUMBER(漲停A,HIGH*1.04,漲停次數(shù)),COLORYELLOW;
DRAWNUMBER(跌停A,HIGH*1.04,跌停次數(shù)),COLORCYAN;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.62,0.95,0,漲停次數(shù)),COLORYELLOW;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.72,0.95,0,跌停次數(shù)),COLORCYAN;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.55,0.95,0,'上市以來(lái)共漲停:'),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.65,0.95,0,'上市以來(lái)共跌停:'),COLORCYAN;
漲停K線:=IF((C-A1000)*100/A1000>=(10-0.01*100/A1000),1,0);
跌停K線:=IF((A1000-C)*100/A1000>=(10-0.01*100/A1000),1,0);
聯(lián)系客服