主图
XG:HHV(H,480),DOTLINE,COLORCYAN;
RQ:=DATETODAY(DATE)-DATETODAY(REF(DATE,TOTALBARSCOUNT-CURRBARSCOUNT))+1;
JY:=BARSLAST((RQ-REF(RQ,1))!=WEEKDAY-REF(WEEKDAY,1) OR TOTALBARSCOUNT-CURRBARSCOUNT=0)+1;
MA1:=REF(C,JY);
MA2:=REF(MA1,JY);
MA3:=REF(MA2,JY);
MA4:=REF(MA3,JY);
MA5:=REF(MA4,JY);
MA6:=REF(MA5,JY);
MA7:=REF(MA6,JY);
MA8:=REF(MA7,JY);
MA9:=REF(MA8,JY);
H1:=MAX(DYNAINFO(3),DYNAINFO(5));
L1:=MIN(DYNAINFO(3),DYNAINFO(6));
P1:=H1-L1;
阻力:L1+P1*8/9,COLORLIRED,DOTLINE;
支撑:L1+P1*0.5/9,COLORGREEN,DOTLINE;
均线:IF(BETWEEN(C/(SUM(AMOUNT,0)/SUM(VOL*100,0)),1.05,0.95)=0,MA(C,0),(SUM(AMOUNT,0)/SUM(VOL*100,0))),COLORYELLOW,DOTLINE;
DIF:=(EMA(CLOSE,12)-EMA(CLOSE,26))+DYNAINFO(3);
DEA:=EMA(DIF,9);
MACD1:=10*(DIF-DEA);
MACD2:=EMA(MACD1,2);
STICKLINE(MACD1>=MACD2 AND MACD1>=0,DYNAINFO(3),MACD1+DYNAINFO(3),0,-1),COLORLIGRAY;
STICKLINE(MACD1<MACD2 AND MACD1>0,DYNAINFO(3),MACD1+DYNAINFO(3),0,-1),COLORLICYAN;
STICKLINE(MACD1>=MACD2 AND MACD1<0,DYNAINFO(3),MACD1+DYNAINFO(3),0,-1),COLORLIGRAY;
STICKLINE(MACD1<MACD2 AND MACD1<0,DYNAINFO(3),MACD1+DYNAINFO(3),0,-1),COLORLIGREEN;
XX:=SUM(AMOUNT,BARSCOUNT(CLOSE))/SUM(V*100,BARSCOUNT(CLOSE));
主力:=EXPMA(CLOSE/XX,20);大户:=EXPMA(CLOSE/XX,60);散户:=EXPMA(CLOSE/XX,120);
底:=1;1.022,NODRAW;高:=1.033;
DRAWTEXT(CROSS(主力,1.02),C*0.999,' 拉'),COLORMAGENTA;
DRAWICON(CROSS(主力,1.04),C,45);
DRAWTEXT(CROSS(主力,1.04),C*0.999,' 冲'),COLORRED;
A1:=(VOL/CLOSE)/3;
A2:=SUM((IF(((A1>40) AND (CLOSE>(REF(CLOSE,1)))),A1,0)),0);
A3:=SUM((IF(((A1>40) AND (CLOSE<(REF(CLOSE,1)))),A1,0)),0);
A4:=SUM((IF(((A1<40) AND (CLOSE>(REF(CLOSE,1)))),A1,0)),0);
A5:=SUM((IF(((A1<40) AND (CLOSE<(REF(CLOSE,1)))),A1,0)),0);
A6:=((A2+A3)+A4)+A5;
A7:=IF((BARSTATUS=2),((100*A2)/A6),0);
A8:=((IF((BARSTATUS=2),((100*A3)/A6),0)));
A9:=((IF((BARSTATUS=2),((100*A4)/A6),0)));
A10:=((IF((BARSTATUS=2),((100*A5)/A6),0)));
DRAWTEXT(LONGCROSS(支撑,C,2),C-0.01,' 买入'),COLOR0000FF;
DRAWICON(LONGCROSS(支撑,C,2),C-0.01,1);
STICKLINE(LONGCROSS(支撑,C,2),C,阻力,0,-1),COLORCYAN;
DRAWTEXT(LONGCROSS(C,阻力,2),C+0.01,' 卖出'),COLORGREEN;
DRAWICON(LONGCROSS(C,阻力,2),C+0.01,45);
STICKLINE(LONGCROSS(C,阻力,2),C,支撑,0,-1),COLORRED;
量价:=(VOL/CLOSE)/3;
B2:=SUM((IF(((量价>0.20) AND (CLOSE>(REF(CLOSE,1)))),量价,0)),0);
B3:=SUM((IF(((量价>0.20) AND (CLOSE<(REF(CLOSE,1)))),量价,0)),0);
B6:=B2+B3;DD1:=1;比:=B2/B3;
D1:=YEAR AND MONTH AND DAY;
BA1:=STRCAT(CON2STR(YEAR,0),'年');
BA2:=STRCAT(CON2STR(MONTH,0),'月');
BA3:=STRCAT(CON2STR(DAY,0),'日');
BA4:=STRCAT('星期',IF(WEEKDAY=1,'一',IF(WEEKDAY=2,'二',IF(WEEKDAY=3,'三',IF(WEEKDAY=4,'四',IF(WEEKDAY=5,'五',IF(WEEKDAY=6,'六','日')))))));
AA:=STRCAT(STRCAT(STRCAT(BA1,BA2),STRCAT(BA3,BA4)),'');
DRAWTEXT_FIX(D1,0.905,0,0,AA),COLORGRAY;
WA1:=V*C/100;{股票下载网WWW.GPXIAZAI.COM}
WA2:=SUM((IF(((WA1/8>20) AND (CLOSE>(REF(CLOSE,1)))),WA1,0)),0);
WA3:=SUM((IF(((WA1/8>20) AND (CLOSE<(REF(CLOSE,1)))),WA1,0)),0);
WA4:=SUM((IF(((WA1/8<20) AND (CLOSE>(REF(CLOSE,1)))),WA1,0)),0);
WA5:=SUM((IF(((WA1/8<20) AND (CLOSE<(REF(CLOSE,1)))),WA1,0)),0);
WA6:=((A2+A3)+A4)+A5;
WA7:=IF((ISLASTBAR),((100*WA2)/WA6),0);
WA8:=IF((ISLASTBAR),((100*WA3)/WA6),0);
WA9:=IF((ISLASTBAR),((100*WA4)/WA6),0);
WA10:=IF((ISLASTBAR),((100*WA5)/WA6),0);
机构买盘:=(WA2);
机构卖盘:=(WA3);
散户买盘:=(WA4);
散户卖盘:=(WA5);
DRAWTEXT_FIX(1,0.752,1-0.088,0,STRCAT(STRCAT('【机构买盘】',CON2STR(机构买盘,2)),' 万')),COLORRED;
DRAWTEXT_FIX(1,0.752,1-0.001,0,STRCAT(STRCAT('【机构卖盘】',CON2STR(机构卖盘,2)),' 万')),COLORGREEN;
DRAWTEXT_FIX(1,0.883,1-0.088,0,STRCAT(STRCAT('【散户买盘】',CON2STR(散户买盘,2)),' 万')),COLORMAGENTA;
DRAWTEXT_FIX(1,0.883,1-0.001,0,STRCAT(STRCAT('【散户卖盘】',CON2STR(散户卖盘,2)),' 万')),COLORCYAN;
牛散分时副图
A1:=SUM(IF(CLOSE>REF(CLOSE,1),VOL/CAPITAL*100,IF(CLOSE<REF(CLOSE,1),-VOL/CAPITAL*100,0)),0);
成交额:=V*C/100,NODRAW;
A2:=SUM((IF(((成交额/8>20) AND (CLOSE>(REF(CLOSE,1)))),成交额,0)),0);
A3:=SUM((IF(((成交额/8>20) AND (CLOSE<(REF(CLOSE,1)))),成交额,0)),0);
A4:=SUM((IF(((成交额/8<20) AND (CLOSE>(REF(CLOSE,1)))),成交额,0)),0);
A5:=SUM((IF(((成交额/8<20) AND (CLOSE<(REF(CLOSE,1)))),成交额,0)),0);
A6:=((A2+A3)+A4)+A5;
A7:=IF((ISLASTBAR),((100*A2)/A6),0);
A8:=IF((ISLASTBAR),((100*A3)/A6),0);
A9:=IF((ISLASTBAR),((100*A4)/A6),0);
A10:=IF((ISLASTBAR),((100*A5)/A6),0);
机构买:(A2),LINETHICK6,COLORRED;
机构卖:(A3),LINETHICK6,COLORGREEN;
机构进出:机构买-机构卖,NODRAW;
散户买:(A4),COLOR5555FF;
散户卖:(A5),COLOR55FF55;
强势:((100*A2)/A6>50);
STICKLINE(强势,机构买*1.02,机构买*1.1,1,0),COLORYELLOW;
拉升:((100*A2)/A6-(100*A3)/A6)>18 AND (100*A2)/A6-(100*A5)/A6>18;
STICKLINE(拉升,机构买*1.1,机构买*1.2,1,0),COLORRED;
DRAWTEXT(ISLASTBAR=1,机构买*0.95,''),LINETHICK2,COLORRED;
DRAWTEXT(ISLASTBAR=1,机构卖*0.95,''),LINETHICK2,COLORFFFF55;
WWW70822COM:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
Q:=BETWEEN(C/(SUM(AMOUNT,BARSCOUNT(C))/SUM(VOL*100,BARSCOUNT(C))),1.05,0.95);
Q2:=IF(Q=0,MA(C,BARSCOUNT(C)),(SUM(AMOUNT,BARSCOUNT(C))/SUM(VOL*100,BARSCOUNT(C))));
DRAWICON(CROSS((C/Q2),1.03),机构买,5);
DD1:=1;
AAA1:=STRCAT(STRCAT('机构买入',CON2STR((100*A2)/A6,0)),'%');
AAA2:=STRCAT(STRCAT('机构卖出',CON2STR((100*A3)/A6,0)),'%');
AAA0:=STRCAT(STRCAT('机构总买入',CON2STR((100*(A2-A3))/A6,0)),'%');
AAA3:=STRCAT(STRCAT('散户买入',CON2STR((100*A4)/A6,0)),'%');
AAA4:=STRCAT(STRCAT('散户卖出',CON2STR((100*A5)/A6,0)),'%');
AAA5:=STRCAT(STRCAT('散户总买入',CON2STR((100*(A4-A5))/A6,0)),'%');
DRAWTEXT_FIX(DD1=1,0.001,0.05,0,AAA1),COLORRED;
DRAWTEXT_FIX(DD1=1,0.001,0.15,0,AAA2),COLORGREEN;
DRAWTEXT_FIX(DD1=1,0.001,0.25,0,AAA3),COLORRED;
DRAWTEXT_FIX(DD1=1,0.001,0.35,0,AAA4),COLORGREEN;
DRAWTEXT_FIX(DD1=1,0.001,0.45,0,AAA0),LINETHICK5,COLORCYAN;
DRAWTEXT_FIX(DD1=1,0.001,0.55,0,AAA5),LINETHICK5,COLORCYAN;
牛熊强弱副图
MA30:=EMA(CLOSE,30);
强弱:EMA(CLOSE,900);
STICKLINE((MA30>强弱),MA30,强弱,1,0),COLOR0000FF;
STICKLINE((MA30<强弱),MA30,强弱,1,0),COLOR00FF00;
H1:=MAX(DYNAINFO(3),DYNAINFO(5));
L1:=MIN(DYNAINFO(3),DYNAINFO(6));
P1:=H1-L1;
阻力:L1+P1*7/8,COLOR00DD00;
支撑:L1+P1*0.5/8,COLOR00DD00;
现价:CLOSE,COLORWHITE,LINETHICK1;
STICKLINE(CROSS(支撑,现价),支撑,阻力,1,0),COLORYELLOW;
DRAWTEXT(LONGCROSS(支撑,现价,2),支撑*1.001,'★B'),COLORYELLOW;{吸}
DRAWTEXT(LONGCROSS(现价,阻力,2),现价,'★'),COLORRED;{抛};