同花顺公式
同花顺倍差指标公式
2019-12-09 19:50  浏览:93
指标名称:同花顺倍差指标公式

指标类型:趋势预测

指标代码:
未发现未来函数
IF(CODETYPE==0)
{
CYC:"该指标不适用于指数。";
RETURN;
}
High1:=IF(ISNULL(HIGH),CLOSE,HIGH);
LOW1:=IF(ISNULL(LOW),CLOSE,LOW);
open1:=IF(ISNULL(OPEN),CLOSE,OPEN);
VAR1:=SMA(MAX(MAX(HIGH1-LOW1,ABS(HIGH1-REF(CLOSE,1))),ABS(LOW1-REF(CLOSE,1))),14,1);
VAR2:=HIGH1-REF(HIGH1,1);
VAR3:=REF(LOW1,1)-LOW1;
VAR4:=SMA(IF(VAR2>0 AND VAR2>VAR3,VAR2,0),12,1);
VAR5:=SMA(IF(VAR3>0 AND VAR3>VAR2,VAR3,0),12,1);
VAR6:=VAR4*100/VAR1;
VAR7:=VAR5*100/VAR1;
VAR8:=SMA(ABS(VAR7-VAR6)/(VAR7+VAR6)*100,12,1);
VAR9:=(VAR8+REF(VAR8,5))/2;
VARA:=SUM(HIGH1-OPEN1,12)/SUM(OPEN1-LOW1,12)*100;
VARB:=SUM(MAX(0,HIGH1-REF(CLOSE,1)),12)/SUM(MAX(0,REF(CLOSE,1)-LOW1),12)*100;
MO:=MONEY;
VO:=VOL;
IF(VOL==0) VO:=VO[1];
VARD:=(3*HIGH1+LOW1+OPEN1+2*CLOSE)/7;
IF(MO==0)
{
VARC:=VARD;
MO:=VARC*VO/100;
}
ELSE
VARC:=MO/VO/100;
IF(ISNULL(VARC)==1 OR VARC==0) VARC:=VARC[1];    //加上这句就好了
VARE:=SUM(MO,5)/VARC/100;
VARF:=SUM(MO,14)/VARC/100;
VAR10:=SUM(MO,29)/VARC/100;
VAR11:=SUM(MO,58)/VARC/100;
VAR12:=SUM(MO,115)/VARC/100;
VAR13:=REF(VO,1)+REF(VO,2)+REF(VO,3)+REF(VO,4);
shares:=SHGZG;
IF(shares==0) shares:=shares[1];
VAR14:=VAR12/(shares/100);
VAR15:=VO/(shares/100)*VARD+VAR13*REF(VARC,1);
CYC5: DMA_(VARD,VO/VARE);
CYC14: DMA_(VARD,VO/VARF);
CYC29: DMA_(VARD,VO/VAR10);
CYC58: DMA_(VARD,VO/VAR11);
CYC115: DMA_(VARD,VO/VAR12);
倍差:=((Cyc58-Cyc115)/Cyc115)*100;
倍差: ((Cyc58-Cyc115)/Cyc115)*100,coloryellow;
基线:1-1,colorwhite;  STICKLINE(REF(倍差,1)<倍差,基线,倍差,6,0),colorred;
本文网址:https://www.fashangji.com/gunews/show/4570/
为你推荐:
发表评论
0评