实用四色主图 源码

2013-02-08 10:01:00来源:本站整理浏览:844

MA5:MA(C,5),COLORWHITE;
MA10:MA(C,10),COLORYELLOW;
MA20:MA(C,20),COLORMAGENTA;
MA30:MA(C,30),COLORGREEN;
MA60:MA(C,60),COLORLIRED;
MA120:MA(C,120),COLORCYAN;
MA240:MA(C,240),COLORRED;{COLORBLUE}
M4:=MA(C,4);M8:=MA(C,8);M32:=MA(C,32);M160:=MA(C,160);
NXJX:IF(PERIOD=5,M160,IF(PERIOD=6,M32,IF(PERIOD=7,M8,
IF(PERIOD=10,M4,DRAWNULL)))),COLORLIMAGENTA,LINETHICK2;
DRAWTEXT(ISLASTBAR,NXJX,CON2STR(NXJX,2)),COLORLIMAGENTA;
做多:=IF("KDJ.K"(9,3,3)>"KDJ.D"(9,3,3) AND "MACD.MACD"(12,26,9)>0 AND V>1,2,0),COLORRED,NODRAW;
做空:=IF("KDJ.K"(9,3,3)<"KDJ.D"(9,3,3) AND "MACD.MACD"(12,26,9)<0 AND V>1,-2,0),COLOR2288EE,NODRAW;
强洗:=IF("MACD.MACD"(12,26,9)>0 AND "KDJ.K"(9,3,3)<"KDJ.D"(9,3,3) AND V>1,1,0),COLOR0099FF,NODRAW;
弱升:=IF("MACD.MACD"(12,26,9)<0 AND "KDJ.K"(9,3,3)>"KDJ.D"(9,3,3) AND V>1,-1,0),COLOR00DD00,NODRAW;
STICKLINE(做多,L,H,0,0),COLORRED;
STICKLINE(做多 AND C>=O,C,O,3,1),COLORRED;
STICKLINE(做多 AND C<O,C,O,3,0),COLORRED;
STICKLINE(做空,L,H,0,0),COLORFF3300;
STICKLINE(做空 AND C>=O,C,O,3,1),COLORFF3300;
STICKLINE(做空 AND C<O,C,O,3,0),COLORFF3300;
STICKLINE(强洗,L,H,0,0),COLOR0099FF;
STICKLINE(强洗 AND C>=O,C,O,3,1),COLOR0099FF;
STICKLINE(强洗 AND C<O,C,O,3,0),COLOR0099FF;
STICKLINE(弱升,L,H,0,0),COLORCCCCCC;
STICKLINE(弱升 AND C>=O,C,O,3,1),COLORCCCCCC;
STICKLINE(弱升 AND C<O,C,O,3,0),COLORCCCCCC;
{www.gpxiazai.com 股票软件下载网_通达信股票指标公式}
DRAWRECTREL(0,500,145,999.4,IF(120,RGB(10,0,10),0));
超B:=L2_AMO(0,2)/10000.0;
大B:=L2_AMO(1,2)/10000.0;
中B:=L2_AMO(2,2)/10000.0;
小B:=L2_AMO(3,2)/10000.0;
超S:=L2_AMO(0,3)/10000.0;
大S:=L2_AMO(1,3)/10000.0;
中S:=L2_AMO(2,3)/10000.0;
小S:=L2_AMO(3,3)/10000.0;
TESTSKIP(NOT(超B OR 大B OR 中B OR 小B OR 超S OR 大S OR 中S OR 小S)!=0);
主力进:=(超B)+(大B),NODRAW;
主力出:=(超S)+(大S),NODRAW;
小散进:=(中B)+(小B),NODRAW;
小散出:=(中S)+(小S),NODRAW;
DAZHIV:=CONST(MAX(ABS(主力进),MAX(ABS(主力出),MAX(ABS(小散进),ABS(小散出))))),NODRAW;
DRAWRECTREL(0,CONST(940-(ABS(主力进)*250/DAZHIV)),30,960,IF(CONST(主力进>0),RGB(255,0,0),RGB(23,125,255)));
DRAWRECTREL(32,CONST(940-(ABS(主力出)*250/DAZHIV)),62,960,IF(CONST(主力出>0),RGB(23,125,255),RGB(255,0,0)));
DRAWRECTREL(70,CONST(940-(ABS(小散进)*250/DAZHIV)),100,960,IF(CONST(小散进>0),RGB(255,0,0),RGB(23,125,255)));
DRAWRECTREL(102,CONST(940-(ABS(小散出)*250/DAZHIV)),132,960,IF(CONST(小散出>0),RGB(23,125,255),RGB(255,0,0)));
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.0001,0.9,0,STRCAT('',CON2STR(主力进/10,0))),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.033,0.9,0,STRCAT('',CON2STR(主力出/10,0))),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.07,0.9,0,STRCAT('',CON2STR(小散进/10,0))),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.101,0.9,0,STRCAT('',CON2STR(小散出/10,0))),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.033,1,0,'(X10万元)'),COLOR00FFFF;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0,1,0,'主进出'),COLORCYAN;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.09,1,0,'散进出'),COLORCYAN;
主力买力度:=LARGEINTRDVOL*1000/VOL;
主力卖力度:=LARGEOUTTRDVOL*1000/VOL;
AAD:=CONST(MAX(ABS(主力买力度),ABS(主力卖力度)))*4,NODRAW;
DRAWRECTREL(0,515,CONST(ABS(主力买力度)*500/AAD),568,IF(CONST(主力买力度)>0,RGB(255,0,0),RGB(0,50,0)));
DRAWRECTREL(0,570,CONST(ABS(主力卖力度)*500/AAD),623,IF(CONST(主力卖力度)>0,RGB(0,50,0),RGB(255,0,0)));
DRAWTEXT_FIX(1,0,0.524,0,STRCAT('主买力度:',CON2STR(主力买力度,0))),COLORYELLOW;
DRAWTEXT_FIX(1,0,0.576,0,STRCAT('主卖力度:',CON2STR(主力卖力度,0))),COLORYELLOW;


 

股票公式栏目导航

精品指标推荐

最新热门

本类随机推荐

相关公式