DIFF : EMA(CLOSE,SHORT) - EMA(CLOSE,LONG);
DEA : EMA(DIFF,M);
MACD : 2*(DIFF-DEA);
Zero : 0;
IF(HHV(VOL,SHIJIAN8)/VOL>5) VAR1=5 ;/*设定最大比例为5倍成交量*/
ELSE VAR1 = HHV(VOL,SHIJIAN8)/VOL;
CHENGJIAOLIANG8 = VAR1*30;
IF(HHV(VOL,SHIJIAN13)/VOL>5) VAR2=5 ;
ELSE VAR2 = HHV(VOL,SHIJIAN13)/VOL;
/* CHENGJIAOLIANG13: VAR2*30;*/
STANDLINE : 75; /*即2.5倍成交量为标准 2.5*30=75 */
AVGVOL=(SUM(VOL,SHIJIAN13+1)-VOL)/SHIJIAN13;
/*IF((AVGVOL/VOL)*(AVGVOL/VOL)>25) THEN AVGDIVLINE : 25*10;*/
/*ELSE AVGDIVLINE : (AVGVOL/VOL)*(AVGVOL/VOL)*10; */
IF ((AVGVOL*AVGVOL-VOL*VOL)/(VOL*VOL)*30>100)
THEN AVGDIVLINE : 100;
ELSE AVGDIVLINE : (AVGVOL*AVGVOL-VOL*VOL)/(VOL*VOL)*30