上面公式可能多加了中文空格,用这个:
{价量结合CCI公式}
N:=20;
BIAS_C:= (CLOSE-MA(CLOSE,N))/MA(CLOSE,N)*100;{价乘法率}
BIAS_V:= (OBV-MA(OBV,N))/MA(OBV,N)*100;{量乘法率}
BIAS_CV:= FORCAST((BIAS_C+BIAS_V)/2,5);{均值}
CCI_CV:= (BIAS_CV-MA(BIAS_CV,N))/(0.015*AVEDEV(BIAS_CV,N));
N1:=20;{以下是布林带}
中:= MA(CCI_CV,N1);
P:=1.618;{或取2}
上:= 中+P*STD(CCI_CV,N1);
下:= 中-P*STD(CCI_CV,N1);
DRAWBAND(上,RGB(70,70,70),下,RGB(70,70,70));
0,POINTDOT,COLORWHITE;
CCI_价量: CCI_CV,COLORYELLOW;
CCI_中: 中,COLORMAGENTA; |