飞狐全方位成交量指标公式

[复制链接]
查看119 | 回复0 | 2021-8-21 11:29:45 | 显示全部楼层 |阅读模式

VOL,VOLSTICK;
预测额:=IF(DATE<>CURRENTDATE OR OPENMINUTES(CURRENTTIME)=1,AMOUNT,(AMOUNT/OPENMINUTES(CURRENTTIME))*240), LINETHICK;
n:=20;
SAT:=IF((预测额/CLOSE)/(HHV(预测额,N)/HHV(CLOSE,N))*100>100,100,(预测额/CLOSE)/(HHV(预测额,N)/HHV(CLOSE,N))*100);
预测量:=IF(DATE<>CURRENTDATE OR OPENMINUTES(CURRENTTIME)=1,VOL,(VOL/OPENMINUTES(CURRENTTIME))*240), LINETHICK;
量:=VOL;
V0001:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
主买:IF(CLOSE>OPEN,V0001*(HIGH-LOW),IF(CLOSE<OPEN,V0001*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2)),Color6d0076,POINTDOT,LINETHICK0,PRECISION0,COLORRED;
主卖:IF(CLOSE>OPEN,0-V0001*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0-V0001*(HIGH-LOW),0-VOL/2)),ColorFFD1BE,POINTDOT,LINETHICK0,PRECISION0;
净买:主买+主卖,COLORMAGENTA,LINETHICK0,PRECISION0;
换手率:VOL/CAPITAL*100,ColorD19857;
hs:=换手率;
量比:IF(BARPOS=DATACOUNT,DYNAINFO(17),VOL/REF(MA(VOL,5),1)),LINETHICK0,COLORYELLOW,PRECISION2;
A:=MA(换手率,2);
X:=LLV(A,20),linethick;
X1:=(A-LLV(A,20))=0;
换手最小:=IF(ALL (A>0,5) AND FILTERX(X1,5),X1,0),COLORRED;
小天:=BARSLAST(换手最小),LINETHICK,color008888;
X2:=HHV(A,20);
X3:=(A-X2)=0;
换手最大:=IF(ALL(REF(A,1)<X2,5) AND FILTERX(X3,5),1,0),COLORGREEN;
STICKLINE(CLOSE<=REF(CLOSE,1) , VOL,0,8,1),ColorFFFF80,LINETHICK1;
STICKLINE(CLOSE>REF(CLOSE,1), VOL,0,8,1),COLORRED,LINETHICK1;
stickline(换手率<1 ,V,0,2.8,0),ColorFF4D91,;
stickline(换手率>1 ,V,0,2.8,0),Color00FF00;
stickline(换手率>3 ,V,0,2.8,0),coloryellow,ColorFFFFFF;
stickline(换手率>5,V,0,2.8,0),color0099ff,COLORMAGENTA;
stickline(换手率>10,V,0,2.8,0),Color0000FF,COLORRED;
DRAWTEXTEX(V,1,0,0,'换手率小于1:紫\\'+NUMTOSTR(SELFDATA('换手率小于1'),0)),ColorFF158A;
DRAWTEXTEX(V,1,110,0,'换手率大于1:绿\\'+NUMTOSTR(SELFDATA('换手率大于1'),0)),COLORGREEN;;
DRAWTEXTEX(V,1,220,0,'换手率大于3:白\\'+NUMTOSTR(SELFDATA('换手率大于3'),0)),ColorFFFFFF;
DRAWTEXTEX(V,1,330,0,'换手率大于5:粉\\'+NUMTOSTR(SELFDATA('换手率大于5'),0)),COLORMAGENTA;
DRAWTEXTEX(V,1,440,0,'换手率大于10:红\\'+NUMTOSTR(SELFDATA('换手率大于10'),0)),COLORRED;
{线形}
l13:=LLV(MA(VOL,5),13),COLORBROWN,LINETHICK2;
m5:MA(V,5),COLORYELLOW,PRECISION0;
m13:=MA(V,13),COLORCYAN,PRECISION0;
m34:MA(V,34),COLORMAGENTA,PRECISION0;
V2:IF(BARSTATUS=2,VOL*240/MINUTE/REF(VOL,1)-1,VOL/REF(VOL,1)-1),COLORRED;
STICKLINE(V2>=1,0,VOL,8,0),COLORYELLOW,;
F:=100*(CLOSE-REF(CLOSE,1))/REF(CLOSE,1);
今小昨:=IF(CLOSE<REF(OPEN,1) AND F<0,1,0);
Sa1:=今小昨;
今小前:=IF(CLOSE<REF(OPEN,2) AND F<0,1,0),LINETHICK0;
Sa2:=今小前;
svol:=INTPART(SUM(VOL,0)/CAPITAL);
tj0:=svol>REF(svol,1) or BARSSINCE(CLOSE)=0;
S1:=BARSLAST(tj0)+1,PRECISION,COLORWHITE;//时间1
tj2:=S1<REF(S1,1);//取点
S2:=IF(tj2,REF(S1,1)+1,S1),PRECISION,COLORMAGENTA;//时间2
S3:=SUM(tj2,0),COLORMAGENTA;
阶段总额(万元):=SUM(AMOUNT/10000,S2)*100,PRECISION,LINETHICK,Color008BFA;//换手100%AMOUNT
阶段总量(手):=SUM(VOL,S2)*100,PRECISION,LINETHICK,COLORCYAN;//换手100%VOL
阶段成本(元):=(阶段总额(万元)/(阶段总量(手)/100)),LINETHICK,PRECISION2,COLORRED;
DRAWTEXT(BARPOS=SYSPARAM(2),HIGH,'■阶段平均成本:'+NUMTOSTR(阶段成本(元)[SYSPARAM(1)],2)+'(元)'),align4,ColorFFE0FF,pxdn30,shift;
{取点}
Zk1:=STKINDI('' ,'kdj.k',0,7);
Zd2:=STKINDI('' ,'kdj.d',0,7);
ZF1:=STKINDI('' ,'macd.diff',0,7);
ZA2:=STKINDI('' ,'macd.dea',0,7);
{建仓统计}
JCD:=FILTER(CROSS(Zk1,Zd2) and Zd2<30,13);{周KD金叉位置}
取点:=BARSLAST(JCD);
吸筹区:=IF(取点>0 and 取点<61,取点,0);
ZS1:=吸筹区;
ZS2:=吸筹区+1;
ZS3:=换手率/5;{庄家筹码估算}
ZSA:=IF(ZS1>0,SUM((ZS3),吸筹区+1),0);{统计庄家筹码}
{控制画线高度}
n1:=SYSPARAM(3);
nn:=n1-SYSPARAM(2)+1;
hh:=HHV(VOL,nn);
ll:=LLV(VOL,nn);
最高:=hh[n1];
最低:=ll[n1];
中:=最低+(最高-最低)*0.5;
PARTLINE(RANGE(BARPOS,SYSPARAM(2),SYSPARAM(1)+1)&&ZS1>0,中),COLORCYAN;//建仓横线
VERTLINE(JCD),LINEDOT,COLORGREEN;//建仓点竖线
{可移动变化数字}
DRAWTEXT(BARSCOUNT(CLOSE)=SYSPARAM(1)&&SYSPARAM(1)>ZS1,中*2.5,' ■主力建仓天数:'+NUMTOSTR(ZS1[SYSPARAM(1)],0)+'(天)'),PXDN1,align2,COLORYELLOW;
DRAWTEXT(BARSCOUNT(CLOSE)=SYSPARAM(1)&&SYSPARAM(1)>ZS1,中*2.5,' \n■估算主力筹码:'+NUMTOSTR(ZSA[SYSPARAM(1)],2)+'%'),PXDN10,align2,COLORMAGENTA;

202108211125.jpg

202108211125.jpg

 

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则