以下是通达信乖离率逃顶副图指标公式源码(无源码的请下载附件导入)
XA_1:=(CLOSE+LOW+HIGH)/3;
XA_2:=SUM((XA_1-REF(LOW,1)-(HIGH-XA_1))*VOL/100000/(HIGH-LOW),0);
XA_3:=EMA(XA_2,1);
XA_4:=XA_3;
XA_5:=MA(XA_3,12);
XA_6:=MA(XA_3,26);
散游乖离率:(XA_4-XA_5)/XA_5*100,NODRAW;
游机乖离率:(XA_5-XA_6)/XA_6*100,NODRAW;
STICKLINE(散游乖离率>0,0,散游乖离率,3,0),COLORRED;
STICKLINE(散游乖离率<0,0,散游乖离率,3,0),COLORGREEN;
STICKLINE(游机乖离率>0,0,游机乖离率,2,1),COLORYELLOW;
STICKLINE(游机乖离率<0,0,游机乖离率,2,1),COLORBLUE;
DRAWICON(BETWEEN(散游乖离率,0.1,(-0.1))>0,0,5);
147111305.png
147199269.png
147277985.jpg
|