通达信的L2各单统计与MACD有效结合 需要L2 源码
最近刚开始学习的用通达信,感觉不错,把通达信的特大,大单,中单,小单数据统计起来,再结合MACD,个人感觉,各单的资金的趋势,与MACD有效的结合,应该是非常不错的。MACD指标的经典性就不浪费口舌了,希望大家多喜欢。数据需要L2。
源码
QW:=100000000;
CDDR:=L2_AMO(0,0);
DDR:=L2_AMO(1,0);
ZDR:=L2_AMO(2,0);
XDR:=L2_AMO(3,0);
CDDC:=L2_AMO(0,1);
DDC:=L2_AMO(1,1);
ZDC:=L2_AMO(2,1);
XDC:=L2_AMO(3,1);
JLRA:=((CDDR+DDR+ZDR+XDR)-(CDDC+DDC+ZDC+XDC)),COLORRED;
CDZR:=L2_AMO(0,2);
DDZR:=L2_AMO(1,2);
ZDZR:=L2_AMO(2,2);
XDZR:=L2_AMO(3,2);
CDZC:=L2_AMO(0,3);
DDZC:=L2_AMO(1,3);
ZDZC:=L2_AMO(2,3);
XDZC:=L2_AMO(3,3);
JLRB:=(CDZR+DDZR+ZDZR+XDZR),COLORRED;
JJCB:=(CDZC+DDZC+ZDZC+XDZC),COLORGREEN;
净流入:SUM(((JLRB-JJCB)+JLRA)/QW,5),COLORRED;
DRAWBAND(净流入,RGB(255,0,0),0,RGB(0,255,0));
DIF:EMA(CLOSE,7)-EMA(CLOSE,21),COLORYELLOW;
DEA:EMA(DIF,6),COLORMAGENTA;
MAC:=(DIF-DEA)*2;
DRAWICON(CROSS(DIF,DEA),DEA,1);
DRAWICON(CROSS(DEA,DIF),DIF,2);
DRAWBAND(DIF,RGB(255,165,0),DEA,RGB(0, 0, 205));
DLB:=(C-H)/H*100,NODRAW;
高低差:=DLB,COLORMAGENTA,NODRAW;
ZDFD:=(H-L)/REF(C,1)*100,NODRAW;
DRAWTEXT(DLB -4.9 AND ZDFD =5.9,净流入,'----跑'),COLORGREEN;
日成交:AMOUNT/QW,NODRAW,COLORWHITE;
流入比:=JLRB/日成交*100,NODRAW,COLORMAGENTA;