以下是同花顺叠加乖离率 多种乖离率叠加副图指标 源码
柱状线,由红变绿(正变负),卖出信号参考;由绿变红,买入信号参考。
DIFF = EMA(CLOSE,SHORT) – EMA(CLOSE,LONG);
DEA = EMA(DIFF,M);
MACD = 2*(DIFF-DEA);
Zero = 0;
RSV=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
a=SMA(RSV,M1,1);
b=SMA(a,M2,1);
e=3*a-2*b;
IF(a<0) a=0;
IF(a>100) a=100;
IF(b<0) b=0;
IF(b>100) b=100;
IF(e<0) e=0;
IF(e>100) e=100;
K=a;
D=b;
J=e;
LC = REF(CLOSE,1);
RSI$1=SMA(MAX(CLOSE-LC,0),N1,1)/SMA(ABS(CLOSE-LC),N1,1)*100;
RSI$2=SMA(MAX(CLOSE-LC,0),N2,1)/SMA(ABS(CLOSE-LC),N2,1)*100;
RSI$3=SMA(MAX(CLOSE-LC,0),N3,1)/SMA(ABS(CLOSE-LC),N3,1)*100;
乖离率=MACD+(j-d)/15+(RSI$1-RSI$3)/10;
参考=MACD*1.5+(j-d)/12+(RSI$1-RSI$3)/8;
相差=2*(参考-乖离率);
其他:MA(相差,5);
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。
评论(0)