通达信主力方程(源码、副图贴图)须开通了L2行情才能正常使用

2017-01-11 22:55:00来源:本站整理浏览:514

{个股DDX}
DRAWRECTREL(0,0,998,998,RGB(0,0,1));
DRAWRECTREL(100,0,900,998,RGB(0,0,1));
DRAWRECTREL(200,0,800,998,RGB(0,0,1));
DRAWRECTREL(300,0,700,998,RGB(0,0,1));
DRAWRECTREL(400,0,600,998,RGB(0,0,1));
DRAWRECTREL(500,0,500,998,RGB(255,255,0));
DRAWRECTREL(0,200,998,200,RGB(255,255,0));
DRAWRECTREL(0,400,998,400,RGB(255,255,0));
DRAWRECTREL(0,600,998,600,RGB(255,255,0));
DRAWRECTREL(0,800,998,800,RGB(255,255,0));

DDX:=(LARGEINTRDVOL-LARGEOUTTRDVOL)*10000/FINANCE(7);
DDY:=IF(TRADENUM>0,(TRADEOUTNUM-TRADEINNUM)*100/TRADENUM,0),NODRAW;
DDZ:=IF(TRADENUM>0,(LARGETRDINNUM-LARGETRDOUTNUM)/TRADENUM*100,0),NODRAW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.03,0.03,0,'DDX') COLOR0000FF;{项目};
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.13,0.03,0,'DDY') COLOR0000FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.23,0.03,0,'DDZ') COLOR0000FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(DDX)>=0,0.03,0.25,0,STRCAT(STRCAT(' ',CON2STR(DDX,2)),' ')),COLOR0000FF;{数据}
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(DDX)<0,0.02,0.25,0,STRCAT(STRCAT(' ',CON2STR(DDX,2)),' ')),COLOR00FF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(DDY)>=0,0.13,0.25,0,STRCAT(STRCAT(' ',CON2STR(DDY,2)),' ')),COLOR0000FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(DDY)<0,0.12,0.25,0,STRCAT(STRCAT(' ',CON2STR(DDY,2)),' ')),COLOR00FF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(DDZ)>=0,0.23,0.25,0,STRCAT(STRCAT(' ',CON2STR(DDZ,2)),' ')),COLOR0000FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(DDZ)<0,0.22,0.25,0,STRCAT(STRCAT(' ',CON2STR(DDZ,2)),' ')),COLOR00FF00;

特大单:=((L2_AMO(0,2)/10000.0)+(-L2_AMO(0,3)/10000.0));
大单:=((L2_AMO(1,2)/10000.0)+(-L2_AMO(1,3)/10000.0));
中单:=((L2_AMO(2,2)/10000.0)+(-L2_AMO(2,3)/10000.0));
小单:=((L2_AMO(3,2)/10000.0)+(-L2_AMO(3,3)/10000.0));
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.32,0.03,0,'特大单') COLOR0000FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.43,0.03,0,'大单') COLOR0000FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.53,0.03,0,'中单') COLOR0000FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.63,0.03,0,'小单') COLOR0000FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(特大单)>=0,0.33,0.25,0,STRCAT(STRCAT(' ',CON2STR(特大单,1)),' ')),COLOR0000FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(特大单)<0,0.32,0.25,0,STRCAT(STRCAT(' ',CON2STR(特大单,1)),' ')),COLOR00FF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(大单)>=0,0.43,0.25,0,STRCAT(STRCAT(' ',CON2STR(大单,1)),' ')),COLOR0000FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(大单)<0,0.42,0.25,0,STRCAT(STRCAT(' ',CON2STR(大单,1)),' ')),COLOR00FF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(中单)>=0,0.53,0.25,0,STRCAT(STRCAT(' ',CON2STR(中单,1)),' ')),COLOR0000FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(中单)<0,0.52,0.25,0,STRCAT(STRCAT(' ',CON2STR(中单,1)),' ')),COLOR00FF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(小单)>=0,0.63,0.25,0,STRCAT(STRCAT(' ',CON2STR(小单,1)),' ')),COLOR0000FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(小单)<0,0.62,0.25,0,STRCAT(STRCAT(' ',CON2STR(小单,1)),' ')),COLOR00FF00;
主力力度:=ABS(LARGEINTRDVOL*100/VOL)-ABS(LARGEOUTTRDVOL*100/VOL),NODRAW;
主动率:=(ACTINVOL-ACTOUTVOL)/(ACTINVOL+ACTOUTVOL)*100 ;
BBD:=(LARGETRDINNUM-LARGETRDOUTNUM);
DRAWTEXT_FIX(1,0.715,0.03,0,STRCAT('主力力度',' ')),COLOR0000FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(主力力度)>=0,0.73,0.25,0,STRCAT(STRCAT(' ',CON2STR(主力力度,1)),' ')),COLOR0000FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(主力力度)<0,0.72,0.25,0,STRCAT(STRCAT(' ',CON2STR(主力力度,1)),' ')),COLOR00FF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.81,0.03,0,STRCAT('主动率','%% ')),COLOR0000FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(主动率)>=0,0.83,0.25,0,STRCAT(STRCAT(' ',CON2STR(主动率,1)),' ')),COLOR0000FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(主动率)<0,0.82,0.25,0,STRCAT(STRCAT(' ',CON2STR(主动率,1)),' ')),COLOR00FF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.93,0.03,0,STRCAT('BBD',' ')),COLOR0000FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(BBD)>=0,0.94,0.25,0,STRCAT(STRCAT(' ',CON2STR(BBD,0)),' ')),COLOR0000FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(BBD)<0,0.93,0.25,0,STRCAT(STRCAT(' ',CON2STR(BBD,0)),' ')),COLOR00FF00;
特大单3:=SUM(特大单,3);
特大单5:=SUM(特大单,5);
特大单10:=SUM(特大单,10);
大单3:=SUM(大单,3);
大单5:=SUM(大单,5);
大单10:=SUM(大单,10);
中单3:=SUM(中单,3);
中单5:=SUM(中单,5);
中单10:=SUM(中单,10);
小单3:=SUM(小单,3);
小单5:=SUM(小单,5);
小单10:=SUM(小单,10);
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(特大单3)>=0,0.33,0.45,0,STRCAT(STRCAT(' ',CON2STR(特大单3,1)),' ')),COLOR0000FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(特大单3)<0,0.32,0.45,0,STRCAT(STRCAT(' ',CON2STR(特大单3,1)),' ')),COLOR00FF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(大单3)>=0,0.43,0.45,0,STRCAT(STRCAT(' ',CON2STR(大单3,1)),' ')),COLOR0000FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(大单3)<0,0.42,0.45,0,STRCAT(STRCAT(' ',CON2STR(大单3,1)),' ')),COLOR00FF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(中单3)>=0,0.53,0.45,0,STRCAT(STRCAT(' ',CON2STR(中单3,1)),' ')),COLOR0000FF;

[1] [2] [3]  下一页

股票公式栏目导航

精品指标推荐

最新热门

本类随机推荐

相关公式