九毛八公式指标
公式模块:
请高手把绝好的大智慧单根差指标改成通达信可用的,谢谢,大智慧版本的公式源码如下:换手:v/CAPITAL*100,linethick0,PRECIS2;
ss1:=ORDER(1);ss2:=ORDER(2);
zqz:=barslast(abs(ss1-ref(ss1,1))>0 or abs(ss2-ref(ss2,1))>0);
zq:=if(zqz>0,zqz,0);
kp:=DYNAINFO(7)>0;
买单均量:=if(zq>0,0,v/ss1);
卖单均量:=if(zq>0,0,v/ss2);
单均差:买单均量-卖单均量,LineThick0,PRECIS2;
红排序z:=sum(单均差>max(买单均量,卖单均量)*红标准/100,周期);
红排序b:=if(zq>0,ref(红排序z,zq),红排序z);
连红:if(红排序b>0,红排序b,0),colorred,LineThick0,PRECIS0;
红排序:连红*kp,colorred,LineThick0,PRECIS0;
均差值z:=sum(if(单均差>0,单均差,0),周期)/连红;
均差值:=if(zq>0,ref(均差值z,zq),均差值z);
均差排序:if(均差值>0,均差值,0)*kp,colorred,LineThick0,PRECIS0;
STICKLINE(c>0,0,0.01,6,0),Color666666;
STICKLINE(zq<1,0,max(买单均量,卖单均量),6,1),Color666666;
STICKLINE(单均差>0 and zq<1,0,单均差,5,0),Colorred;
STICKLINE(单均差<0 and zq<1,0,-单均差,5,0),Colorgreen;
换手:V/CAPITAL*100,LINETHICK0;
SS1:=LARGEINTRDvol;
SS2:=LARGEOUTTRDVOL;
ZQZ:=BARSLAST(ABS(SS1-REF(SS1,1))>0 OR ABS(SS2-REF(SS2,1))>0);
ZQ:=IF(ZQZ>0,ZQZ,0);
KP:=DYNAINFO(7)>0;
买单均量:=IF(ZQ>0,0,V/SS1);
卖单均量:=IF(ZQ>0,0,V/SS2);
周期:=5;
单均差:买单均量-卖单均量,LINETHICK0;
红排序Z:=SUM(单均差>MAX(买单均量,卖单均量)/100,周期);
红排序B:=IF(ZQ>0,REF(红排序Z,ZQ),红排序Z);
连红:IF(红排序B>0,红排序B,0),COLORRED,LINETHICK0;
红排序:连红*KP,COLORRED,LINETHICK0;
均差值Z:=SUM(IF(单均差>0,单均差,0),周期)/连红;
均差值:=IF(ZQ>0,REF(均差值Z,ZQ),均差值Z);
均差排序:IF(均差值>0,均差值,0)*KP,COLORRED,LINETHICK0;
STICKLINE(C>0,0,0.01,6,0),COLOR666666;
STICKLINE(ZQ<1,0,MAX(买单均量,卖单均量),4,1),COLOR666666;
STICKLINE(单均差>0 AND ZQ<1,0,单均差,3,0),COLORRED;
STICKLINE(单均差<0 AND ZQ<1,0,-单均差,3,0),COLORGREEN;