DMA背离指标 (源码)
2013-01-09 10:10:00来源:本站整理浏览:760
N:=10;
DIF:MA(CLOSE,10)-MA(CLOSE,50);
AMA:MA(DIF,10);
B:=DIF-REF(DIF,1);
IF(B>=0,DIF,DRAWNULL),COLORRED,LINETHICK2;
IF(B<=0,DIF,DRAWNULL),COLORFF9900,LINETHICK2;
RSI1:=DIF;
AA:=REF(RSI1,N)=HHV(RSI1,2*N+1);
BB:=BACKSET(AA,N+1);
CC:=FILTER(BB,N) AND RSI1=HHV(RSI1,N+1);
A1:=BARSLAST(REF(CC,1));
顶背离:=REF(CLOSE,A1+1)<CLOSE AND REF(RSI1,A1+1)>RSI1 AND CC;
DRAWLINE(CC,RSI1,FILTER(顶背离>0,5),RSI1,0),COLORGREEN;
AA2:=REF(RSI1,N)=LLV(RSI1,2*N+1);
BB2:=BACKSET(AA2,N+1);
CC2:=FILTER(BB2,N) AND RSI1=LLV(RSI1,N+1);
A2:=BARSLAST(REF(CC2,1));
底背离:=REF(CLOSE,A2+1)>CLOSE AND REF(RSI1,A2+1)<RSI1 AND CC2;
DRAWLINE(CC2,RSI1,FILTER(底背离>0,5),RSI1,0),COLORRED,LINETHICK2;
- 上一篇公式:DMI启动指标 (源码)
- 下一篇公式:买点在黄金三八线指标 (源码)