【通达信指标源码免费送】炒股票超好用的RSI指标公式源码 顶底趋势突破

DRAWGBK(CURRBARSCOUNT=1, RGB(110,108,108),RGB(88,30,0),0,'',0);

LC1:= SMA(C,2,1);

TCRSI:=SMA(MAX(CLOSE-LC1,0),6,1)/SMA(ABS(CLOSE-LC1),6,1)*100;

LC2:= SMA(H,2,1);

THRSI:=SMA(MAX(H-LC2,0),6,1)/SMA(ABS(H-LC2),6,1)*100;

LC3:= SMA(O,2,1);

TORSI:=SMA(MAX(O-LC3,0),6,1)/SMA(ABS(O-LC3),6,1)*100;

LC4:= SMA(L,2,1);

TLRSI:=SMA(MAX(L-LC4,0),6,1)/SMA(ABS(L-LC4),6,1)*100;

TVAR:=SMA(((10000 * CLOSE) / INDEXC),2,1);

『大盘关联』:=SMA(MAX(((10000 * CLOSE) / INDEXC)-TVAR,0),6,1)/SMA(ABS(((10000 * CLOSE) / INDEXC)-TVAR),6,1)*100;

TTRSI:(TCRSI+TORSI+THRSI+TLRSI+『大盘关联』)/5,LINETHICK2;

参考线:EMA(EMA(TTRSI,6),5),LINETHICK2;

中轨:  MA(TTRSI,26),LINETHICK2;

上轨: 中轨+ 2*STD(TTRSI,26),LINETHICK2,COLORFFBB00;

下轨: 中轨- 2*STD(TTRSI,26),LINETHICK2,COLOR00FF00;

底关注:STICKLINE(TTRSI<=20,0,-6,5,0),COLORFF00FF;

买关注:STICKLINE(参考线<=20,-10,-16,5,0),COLOR0000FF;

顶关注:STICKLINE(TTRSI>=80,100,106,5,0),COLOR00FF00;

卖关注:STICKLINE(参考线>=80,110,116,5,0),COLORFF0000;

STICKLINE(CROSS(参考线,中轨),20,80,2,0),COLOR0000FF;

IF(TTRSI>80,TTRSI,DRAWNULL),COLORGREEN,LINETHICK2;{如果TTRSI>80,划绿色线}

IF(TTRSI<=20,TTRSI,DRAWNULL),COLORRED,LINETHICK2;{如果TTRSI<=20,画红色线}

IF(参考线>80,参考线,DRAWNULL),COLORGREEN,LINETHICK2;

IF(参考线<=20,参考线,DRAWNULL),COLORRED,LINETHICK2;

(0)

相关推荐