大智慧SPVSH副图指标
源码
N:=1;
DRAWTEXTREL(0,0,'超赢散户持仓');
换手:=V*100/CAPITAL;
散户:=MA(换手,34);
HS:=vol/capital;
DD:=EMA(散户,N);
DT:=HS*DD*100;
超赢散户持仓: EMA(DT,N),linethick2;
当日增减度: DT, linethick0;
STICKLINE(DT>0,超赢散户持仓,超赢散户持仓+DT,5,0),COLORRed;
STICKLine(DT<0,超赢散户持仓+DT,超赢散户持仓,5,0),COLORGreen;
当日成交 := (DT * capital) * DYNAINFO(11)/10000;
买入手数 := (capital*DT)/100;
净买比:买入手数/vol*100,linethick0,ColorFFFFFF;
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;