SHORT:=12;LONG:=26;M:=12;
DIF:=EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
DEA:=EMA(DIF,M);
DD:=(MACD/2+(DEA*(M-1)/(M+1)))/(1-2/(M+1));
DIF拐头价:=(DIF*(SHORT+1)*(LONG+1)-(LONG+1)*(SHORT-1)*EMA(C,SHORT)+(SHORT+1)*(LONG-1)*EMA(C,LONG))/(2*((LONG+1)-(SHORT+1)));
柱变向价:=(DD*(SHORT+1)*(LONG+1)-(LONG+1)*(SHORT-1)*EMA(C,SHORT)+(SHORT+1)*(LONG-1)*EMA(C,LONG))/(2*((LONG+1)-(SHORT+1)));
上拐:CROSS(柱变向价,DIF拐头价);
九毛八公式解读
SHORT赋值:12 LONG赋值:26 M赋值:12 DIF赋值:收盘价的SHORT日指数移动平均-收盘价的LONG日指数移动平均 DEA赋值:DIF的M日指数移动平均 DD赋值:(平滑异同平均/2+(DEA*(M-1)/(M+1)))/(1-2/(M+1)) DIF拐头价赋值:(DIF*(SHORT+1)*(LONG+1)-(LONG+1)*(SHORT-1)*收盘价的SHORT日指数移动平均+(SHORT+1)*(LONG-1)*收盘价的LONG日指数移动平均)/(2*((LONG+1)-(SHORT+1))) 柱变向价赋值:(DD*(SHORT+1)*(LONG+1)-(LONG+1)*(SHORT-1)*收盘价的SHORT日指数移动平均+(SHORT+1)*(LONG-1)*收盘价的LONG日指数移动平均)/(2*((LONG+1)-(SHORT+1))) 输出上拐:柱变向价上穿DIF拐头价