原理:計(jì)算當(dāng)日macd金叉或死叉需要滿足的價(jià)格,以及macd走平或柱體放大縮小滿足的價(jià)格位,可以當(dāng)作止損止盈的一種測算方法!【將代碼插入macd指標(biāo)就ok了】
JCSC:=(9-1)/(9+1)*DEA/(1-2/(9+1));{計(jì)算出金叉死叉時(shí)的DIF值}
DD:=(MACD/2+(DEA*(9-1)/(9+1)))/(1-2/(9+1));{計(jì)算出明日MACD=MACD時(shí)的DIF值}
{計(jì)算今日DIF=DIF的對(duì)應(yīng)股價(jià)}
DIF不變:(DIF*(12+1)*(26+1)-(26+1)*(12-1)*EMA(C,12)+(12+1)*(26-1)*EMA(C,26))/(2*((26+1)-(12+1))),NODRAW;
金叉死叉:(JCSC*(12+1)*(26+1)-(26+1)*(12-1)*EMA(C,12)+(12+1)*(26-1)*EMA(C,26))/(2*((26+1)-(12+1))),NODRAW;
柱體變向:(DD*(12+1)*(26+1)-(26+1)*(12-1)*EMA(C,12)+(12+1)*(26-1)*EMA(C,26))/(2*((26+1)-(12+1))),NODRAW;
|
|