大智慧多空能量副图指标
源码
a:=hhv(h,240);
空方能量:100*(a-c)/c,COLOR00ff00,linethick2;
b:=llv(h,240);
多方能量:100*(c-b)/b,COLORff00ff,linethick2;
a1:=sum(VOL,5)/CAPITAL;
cyf5:=100-(100/(1+a1));
动力:cyf5*3.21,COLORRED,linethick2;
cyf5*3.21,COLORYELLOW,linethick2,pointdot;
==================================================================================================
{逐单逐笔:小单}
小买:"分笔0.小买#tick",LINETHICK1,COLORred;
小卖:"分笔0.小卖#tick",LINETHICK1,COLORgreen;
小买:=小买;
小卖:=小卖;
小单净:小买-小卖,LINETHICK0,colorFFFF00;
HS:=vol/capital;
DD:=Sum(小单净,1);
DT:=(小买+小卖);
当日总交易: DT, linethick0,coloryellow;
STICKLINE(DT>0,小单净,小单净+DD,5,0),COLORRed;
STICKLine(DT<0,小单净+DD,小单净,5,0),COLORGreen;
当日成交 := (DD * capital) * DYNAINFO(11)/10000;
买入手数 := (capital*DT)/100;
净买比:买入手数/vol,linethick0,COLORWHITE;
if (当日成交>=0) then
begin
Str1:= '净买入:'+ NUMTOSTRN(当日成交,0)+'万元,';
Str2 := '净买入:'+ NUMTOSTRN(买入手数,0)+'手,';
Str3 := '当日增减度:' + NUMTOSTRN(DT,3);
end;
if 当日成交<0 then
begin
Str1:= '净卖出:'+ NUMTOSTRN(当日成交,0)+'万元,';
Str2 := '净卖出:'+ NUMTOSTRN(买入手数,0)+'手,';
Str3 := '当日增减度:' + NUMTOSTRN(DT,3);
end;
DRAWFLAGTEXT(DT>=0,小单净,Str1+str2+str3),COLORRED;
DRAWFLAGTEXT(DT<0,小单净,Str1+str2+str3),COLORGREEN;
DRAWTEXTREL(1,30,STKLABEL),ColorEEBB88;DRAWTEXTREL(85,30,STKNAME),ColorEEBB88;
==================================================================================================
{逐单逐笔:小单量}
DRAWGBKLAST(L,STRIP(RGB(0,0,205),RGB(47,79,79),0));
HS:=vol/capital;
小单:=EXTDATA(5);{5}
小单:小单,LINETHICK5,colorred;
DD:=小单-REF(小单,2);
DT:=HS*DD*100;
小单量: 50+Sum(DT,0);
当日增减度: DT, linethick0;
STICKLINE(DT>0,小单量,小单量+DT,5,0),COLORRed;
STICKLine(DT<0,小单量+DT,小单量,5,0),COLORGreen;
当日成交 := (DT * capital) * DYNAINFO(11)/10000;
买入手数 := (capital*DT)/100;
if (当日成交>=0) then
begin
Str1:= '估计净买入:'+ NUMTOSTRN(当日成交,0)+'万元,';
Str2 := '估计净买入:'+ NUMTOSTRN(买入手数,0)+'手,';
Str3 := '当日增减度:' + NUMTOSTRN(DT,3);
end;
if 当日成交<0 then
begin
Str1:= '估计净卖出:'+ NUMTOSTRN(当日成交,0)+'万元,';
Str2 := '估计净卖出:'+ NUMTOSTRN(买入手数,0)+'手,';
Str3 := '当日增减度:' + NUMTOSTRN(DT,3);
end;
DRAWFLAGTEXT(DT>=0,小单量,Str1+str2+str3),COLORRED;
DRAWFLAGTEXT(DT<0,小单量,Str1+str2+str3),COLORGREEN;
==================================================================================================
{逐单逐笔:中单}
中买:"分笔0.中买#tick",LINETHICK3,COLORred;
中卖:"分笔0.中卖#tick",LINETHICK3,COLORgreen;
大买:=中买;
中卖:=中卖;
中单净:中买-中卖,LINETHICK0,colorFFFF00;
HS:=vol/capital;
DD:=Sum(中单净,1);
DT:=(中买+中卖);
当日总交易: DT, linethick0,coloryellow;
STICKLINE(DT>0,中单净,中单净+DD,5,0),COLORRed;
STICKLine(DT<0,中单净+DD,中单净,5,0),COLORGreen;
当日成交 := (DD * capital) * DYNAINFO(11)/10000;
买入手数 := (capital*DT)/100;
净买比:买入手数/vol,linethick0,COLORWHITE;
if (当日成交>=0) then
begin
Str1:= '净买入:'+ NUMTOSTRN(当日成交,0)+'万元,';
Str2 := '净买入:'+ NUMTOSTRN(买入手数,0)+'手,';
Str3 := '当日增减度:' + NUMTOSTRN(DT,3);
end;
if 当日成交<0 then
begin
Str1:= '净卖出:'+ NUMTOSTRN(当日成交,0)+'万元,';
Str2 := '净卖出:'+ NUMTOSTRN(买入手数,0)+'手,';
Str3 := '当日增减度:' + NUMTOSTRN(DT,3);
end;
DRAWFLAGTEXT(DT>=0,中单净,Str1+str2+str3),COLORRED;
DRAWFLAGTEXT(DT<0,中单净,Str1+str2+str3),COLORGREEN;
DRAWTEXTREL(1,30,STKLABEL),ColorEEBB88;DRAWTEXTREL(85,30,STKNAME),ColorEEBB88;