大智慧大单分布分笔指标介绍
大智慧大单分布分笔指标
{a1、10 1 400 a2、20 1 400 a3、50 1 400}
现价:=c;
Var2:=REF(ASKPRICE(1),1);
Var3:=REF(BIDPRICE(1),1);
var5:=buyvol;
var6:=sellvol;
x1:=a1*10000;
x2:=a2*10000;
x3:=a3*10000;
tdb:=IF(AMOUNT>=x3,Var5,0);
特大买量:=sum(tdb,0);
tds:=IF(AMOUNT>=x3,Var6,0);
特大卖量:=sum(tds,0);
db:=IF(AMOUNT>=x1 and amount<x2,Var5,0);
ds:=IF(AMOUNT>=x1 and amount<x2,Var6,0);
中买量:=SUM(db,0);
中卖量:=SUM(ds,0);
db1:=IF(AMOUNT>=x2 and amount<x3,Var5,0);
ds1:=IF(AMOUNT>=x2 and amount<x3,Var6,0);
大买量:=SUM(db1,0);
大卖量:=SUM(ds1,0);
小买量:=SUM(IF(AMOUNT<x1,Var5,0),0);
小卖量:=SUM(IF(AMOUNT<x1,Var6,0),0);
小量差:=小买量-小卖量;
中量差:中买量-中卖量,linethick0;
大量差:大买量-大卖量,linethick0;
特大量差:特大买量-特大卖量,linethick0;
主力量差:大量差+特大量差,linethick0;
FILLRGN(主力量差,0,主力量差>0,rgb(120,60,30),主力量差<0,rgb(100,100,100));
中上差:中量差+主力量差,coloryellow;
小差:小量差,colorgray;
主力差额:主力量差*c/100,PRECIS0,linethick0;
主力增仓:主力量差/capital*100,linethick0;
总量:=sum(vol,0);
sb1:=小买量/总量*100;
ss1:=小卖量/总量*100;
sb:=中买量/总量*100;
ss:=中卖量/总量*100;
bb:=大买量/总量*100;
bs:=大卖量/总量*100;
lb:=特大买量/总量*100;
ls:=特大卖量/总量*100;
DRAWTEXTABS(10 ,10 ,'主力量差 : '+主力量差),COLORMAGENTA,linethick3;
DRAWTEXTABS(10 ,30 ,'主力增仓 : '+主力增仓+'%'),COLORMAGENTA,linethick3;
DRAWTEXTABS(10 ,120 ,'小买% '+sb1),colorred;
DRAWTEXTABS(10 ,135 ,'小卖% '+ss1),colorgreen;
DRAWTEXTABS(90 ,120 ,'中买% '+sb),colorred;
DRAWTEXTABS(90 ,135 ,'中卖% '+ss),colorgreen;
DRAWTEXTABS(170 ,120 ,'大买% '+bb),colorred;
DRAWTEXTABS(170 ,135 ,'大卖% '+bs),colorgreen;
DRAWTEXTABS(250 ,120 ,'特买% '+lb),colorred;
DRAWTEXTABS(250 ,135 ,'特卖% '+ls),colorgreen;
DRAWRECTABS(40 ,118-sb1 , 52 ,118 ,RGB(255,0,0)),colorblack;
DRAWRECTABS(58 ,118-ss1, 70 ,118 ,RGB(0,255,0)),colorblack;
DRAWRECTABS(120 ,118-sb , 132 ,118 ,RGB(255,0,0)),colorblack;
DRAWRECTABS(138 ,118-ss, 150 ,118 ,RGB(0,255,0)),colorblack;
DRAWRECTABS(190 ,118-bb , 202 ,118 ,RGB(255,0,0)),colorblack;
DRAWRECTABS(208 ,118-bs , 220 ,118 ,RGB(0,255,0)),colorblack;
DRAWRECTABS(270 ,118-lb , 282 ,118 ,RGB(255,0,0)),colorblack;
DRAWRECTABS(288 ,118-ls , 300 ,118 ,RGB(0,255,0)),colorblack;
gd53923