SHORT:=12;LONG:=26;M:=9;
C,COLORBLACK;DIFF :=EMA(CLOSE,SHORT) - EMA(CLOSE,LONG);DEA :=EMA(DIFF,M);MACD :=2*(DIFF-DEA);JCSC:=(M-1)/(M+1)*DEA/(1-2/(M+1));{计算出金叉死叉时的DIFF值}DD:=(MACD/2+(DEA*(M-1)/(M+1)))/(1-2/(M+1));{计算出明日MACD=MACD时的DIFF值}DIF拐点:(DIFF*(SHORT+1)*(LONG+1)-(LONG+1)*(SHORT-1)*EMA(C,SHORT)+(SHORT+1)*(LONG-1)*EMA(C,LONG))/(2*((LONG+1)-(SHORT+1)));{计算今日DIFF=DIFF的对应股价}金叉死叉:(JCSC*(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)));{计算MACD柱体变向时的对应股价};IF(DIF拐点>=金叉死叉,DIF拐点,DRAWNULL),COLORRED,LINETHICK2; IF(DIF拐点<金叉死叉,DIF拐点,DRAWNULL),COLORGREEN,LINETHICK2; IF(柱体变向>=金叉死叉,柱体变向,DRAWNULL),COLORRED,LINETHICK2; IF(金叉死叉>=柱体变向,金叉死叉,DRAWNULL),COLORBLUE,LINETHICK2;股票公式结合软件的应用属于进阶阶段的股票学了,我们整理网上提出的通达信机械量化MACD拐点指标公式的问题一些解决方案仅供辅助你学习通达信公式参考,具体内容可能需要具体解决或者找网上其他高手帮忙,也感谢文字和图片来源于股旁网的一些资源分享,帮助新手快速学习提高炒股技能。
声明:通达信机械量化MACD拐点指标公式的文字和图片来源于网络,版权归原作者所有,仅代表个人观点,于本站无关。
随便说说