说明:下面2个都是我从网络上收集的,操盘先锋是理想论坛的。我发帖的目的:希望理想论坛的高手能出手帮助,将操盘先锋的柱形图改编成资金的趋势曲线,这样分时图盘中实时观察更好些,因为我们要的是资金流向的趋势,不是简单的数值。L2的行情只有深证是免FEI的,上证的就不行了。如果能够改编成功,大家就又多了一个制胜的手段。
大智慧L2逐笔分时 逐笔统计公式源码:
合买笔:=sum(TRANSACTNUM(1,0),0);
合卖笔:=sum(TRANSACTNUM(2,0),0);
特买笔:=sum(TRANSACTNUM(1,3),0);
特卖笔:=sum(TRANSACTNUM(2,3),0);
大买笔:=sum(TRANSACTNUM(1,2),0)-特买笔;
大卖笔:=sum(TRANSACTNUM(2,2),0)-特卖笔;
中买笔:=sum(TRANSACTNUM(1,1),0)-sum(TRANSACTNUM(1,2),0);
中卖笔:=sum(TRANSACTNUM(2,1),0)-sum(TRANSACTNUM(2,2),0);
散买笔:=合买笔-sum(TRANSACTNUM(1,1),0);
散卖笔:=合卖笔-sum(TRANSACTNUM(2,1),0);
总量:=sum(TRANSACTVOL(0,0),0);
总买量:sum(TRANSACTVOL(1,0),0),PRECIS0,LineThick1,colorred;
总卖量:sum(TRANSACTVOL(2,0),0),PRECIS0,LineThick1,colorgreen;
总净量:总买量-总卖量,PRECIS0,LineThick2,coloryellow;
特买量:=sum(TRANSACTVOL(1,3),0);
特卖量:=sum(TRANSACTVOL(2,3),0);
大买量:=sum(TRANSACTVOL(1,2),0)-特买量;
大卖量:=sum(TRANSACTVOL(2,2),0)-特卖量;
中买量:=sum(TRANSACTVOL(1,1),0)-sum(TRANSACTVOL(1,2),0);
中卖量:=sum(TRANSACTVOL(2,1),0)-sum(TRANSACTVOL(2,2),0);
散买量:=总买量-sum(TRANSACTVOL(1,1),0);
散卖量:=总卖量-sum(TRANSACTVOL(2,1),0);
分时净量X10:(TRANSACTVOL(1,0)-TRANSACTVOL(2,0))*10,PRECIS0,LineThick2,color3d;
DRAWTEXTABS(2,2,'注意:对涨停板的买量统计注意忽略,DZH默认将涨停板的卖单视为买单。'),colorbbbbbb;
逐笔统计源码
合买笔:=sum(TRANSACTNUM(1,0),0);
合卖笔:=sum(TRANSACTNUM(2,0),0);
特买笔:=sum(TRANSACTNUM(1,3),0);
特卖笔:=sum(TRANSACTNUM(2,3),0);
大买笔:=sum(TRANSACTNUM(1,2),0)-特买笔;
大卖笔:=sum(TRANSACTNUM(2,2),0)-特卖笔;
中买笔:=sum(TRANSACTNUM(1,1),0)-sum(TRANSACTNUM(1,2),0);
中卖笔:=sum(TRANSACTNUM(2,1),0)-sum(TRANSACTNUM(2,2),0);
散买笔:=合买笔-sum(TRANSACTNUM(1,1),0);
散卖笔:=合卖笔-sum(TRANSACTNUM(2,1),0);
总量:=sum(TRANSACTVOL(0,0),0);
总买量:=sum(TRANSACTVOL(1,0),0);
总卖量:=sum(TRANSACTVOL(2,0),0);
总净量:=总买量-总卖量;
特买量:=sum(TRANSACTVOL(1,3),0);
特卖量:=sum(TRANSACTVOL(2,3),0);
大买量:=sum(TRANSACTVOL(1,2),0)-特买量;
大卖量:=sum(TRANSACTVOL(2,2),0)-特卖量;
中买量:=sum(TRANSACTVOL(1,1),0)-sum(TRANSACTVOL(1,2),0);
中卖量:=sum(TRANSACTVOL(2,1),0)-sum(TRANSACTVOL(2,2),0);
散买量:=总买量-sum(TRANSACTVOL(1,1),0);
散卖量:=总卖量-sum(TRANSACTVOL(2,1),0);
特净量:(特买量-特卖量),PRECIS0,LineThick0,colorred;
大净量:(大买量-大卖量),PRECIS0,LineThick0,color208fff;
中净量:(中买量-中卖量),PRECIS0,LineThick0,coloryellow;
分时净量:(TRANSACTVOL(1,0)-TRANSACTVOL(2,0)),PRECIS0,LineThick0,color3d;
X:=IF(HOUR<13,0,0);
y:=13;
DRAWTEXTABS(2,2,'说明:特大单:>50万股或100万元,大单:>10万股或20万元,中单:>2万股或4万元'),colorbbbbbb;
DRAWTEXTABS(5+X,5+y,'分 类 特大单 大 单 中 单 总 单 特 大 中 散 总 买撤 卖撤'),COLORwhite;
DRAWRECTABS(0+X,2+y,240+X,20+y,rgb(255,0,0)),COLORcyan;
DRAWRECTABS(0+X,18+y,240+X,50+y,rgb(1,1,1)),COLORcyan;
DRAWRECTABS(0+X,48+y,240+X,65+y,rgb(0,0,255)),COLORcyan;
DRAWRECTABS(0+X,63+y,240+X,95+y,rgb(1,1,1)),COLORcyan;
DRAWRECTABS(0+X,93+y,240+X,110+y,rgb(0,0,255)),COLORcyan;
DRAWRECTABS(239+X,2+y,400+X,20+y,rgb(255,0,0)),COLORcyan;
DRAWRECTABS(239+X,110+y,400+X,18+y,rgb(1,1,1)),COLORcyan;
DRAWRECTABS(399+X,2+y,470+X,20+y,rgb(255,0,0)),COLORcyan;
DRAWRECTABS(399+X,110+y,470+X,18+y,rgb(1,1,1)),COLORcyan;
DRAWTEXTABS(5+X,20+y,'主买笔'+STRRIGHT(' '+NUMTOSTRN(特买笔,0),8)+STRRIGHT(' '+NUMTOSTRN(大买笔,0),8)+STRRIGHT(' '+NUMTOSTRN(中买笔,0),8)+STRRIGHT(' '+NUMTOSTRN(合买笔,0),8)),COLORred;
DRAWTEXTABS(5+X,35+y,'主卖笔'+STRRIGHT(' '+NUMTOSTRN(特卖笔,0),8)+STRRIGHT(' '+NUMTOSTRN(大卖笔,0),8)+STRRIGHT(' '+NUMTOSTRN(中卖笔,0),8)+STRRIGHT(' '+NUMTOSTRN(合卖笔,0),8)),COLORgreen;
DRAWTEXTABS(5+X,50+y,'净 笔'+STRRIGHT(' '+NUMTOSTRN(特买笔-特卖笔,0),8)+STRRIGHT(' '+NUMTOSTRN(大买笔-大卖笔,0),8)+STRRIGHT(' '+NUMTOSTRN(中买笔-中卖笔,0),8)+STRRIGHT(' '+NUMTOSTRN(合买笔-合卖笔,0),8)),COLORwhite;
DRAWTEXTABS(5+X,65+y,'主买量'+STRRIGHT(' '+NUMTOSTRN(特买量,0),8)+STRRIGHT(' '+NUMTOSTRN(大买量,0),8)+STRRIGHT(' '+NUMTOSTRN(中买量,0),8)+STRRIGHT(' '+NUMTOSTRN(总买量,0),8)),COLORred;
DRAWTEXTABS(5+X,80+y,'主卖量'+STRRIGHT(' '+NUMTOSTRN(特卖量,0),8)+STRRIGHT(' '+NUMTOSTRN(大卖量,0),8)+STRRIGHT(' '+NUMTOSTRN(中卖量,0),8)+STRRIGHT(' '+NUMTOSTRN(总卖量,0),8)),COLORgreen;
DRAWTEXTABS(5+X,96+y,'净 量'+STRRIGHT(' '+NUMTOSTRN(特买量-特卖量,0),8)+STRRIGHT(' '+NUMTOSTRN(大买量-大卖量,0),8)+STRRIGHT(' '+NUMTOSTRN(中买量-中卖量,0),8)+STRRIGHT(' '+NUMTOSTRN(总买量-总卖量,0),8)),COLORwhite;
MA1:=max(总买量,总卖量,SUM(WIDTHDRAWORDER(1),0),sum(WIDTHDRAWORDER(2),0));
DRAWRECTABS(250+X,108+y,258+X,108+y-88*特买量/ma1,rgb(255,0,0)),colorred;
DRAWRECTABS(260+X,108+y,268+X,108+y-88*特卖量/ma1,rgb(0,255,0)),colorgreen;
DRAWRECTABS(280+X,108+y,288+X,108+y-88*大买量/ma1,rgb(255,0,0)),colorred;
DRAWRECTABS(290+X,108+y,298+X,108+y-88*大卖量/ma1,rgb(0,255,0)),colorgreen;
DRAWRECTABS(310+X,108+y,318+X,108+y-88*中买量/ma1,rgb(255,0,0)),colorred;
DRAWRECTABS(320+X,108+y,328+X,108+y-88*中卖量/ma1,rgb(0,255,0)),colorgreen;
DRAWRECTABS(340+X,108+y,348+X,108+y-88*散买量/ma1,rgb(255,0,0)),colorred;
DRAWRECTABS(350+X,108+y,358+X,108+y-88*散卖量/ma1,rgb(0,255,0)),colorgreen;
DRAWRECTABS(370+X,108+y,378+X,108+y-88*总买量/ma1,rgb(255,0,0)),colorred;
DRAWRECTABS(380+X,108+y,388+X,108+y-88*总卖量/ma1,rgb(0,255,0)),colorgreen;
DRAWRECTABS(416+X,108+y,424+X,108+y-88*sum(WIDTHDRAWORDER(1),0)/ma1,rgb(0,255,0)),colorgreen;
DRAWRECTABS(443+X,108+y,451+X,108+y-88*sum(WIDTHDRAWORDER(2),0)/ma1,rgb(255,0,0)),colorred;
{DRAWTEXTABS(405+X,75+y,'买撤:'+sum(WIDTHDRAWORDER(1),0)),colorff00ff;
DRAWTEXTABS(405+X,90+y,'卖撤:'+sum(WIDTHDRAWORDER(2),0)),colorcyan;};
看帖的使劲顶啊,人多了就有高手帮忙了 |