首页 > 编程语言 >通达信美化RSI波段指标公式源码

通达信美化RSI波段指标公式源码

时间:2024-03-10 13:11:36浏览次数:28  
标签:RSI5 RSI OB CROSS 通达信 源码 RSI20 CLOSE REF

{ 通达信美化RSI波段指标公式源码 }

N1:=5;
N2:=10;
N3:=20;
P:=3;
{rsi划线}
{N1:2,120,5;N2:2,250,10;N3:2,500,20;}
{参数:P:1,20,3;}{支撑压力线的周期参数 P可调}
STICKLINE(C>0,0,30,10,0),COLOR353535;
STICKLINE(C>0,30,50,10,0),COLOR454545;
STICKLINE(C>0,50,80,10,0),COLOR555555;
STICKLINE(C>0,80,95,10,0),COLOR757575;
强弱线:50,LINETHICK2,COLOR858585;
警示线:80,POINTDOT,COLORCYAN;
减仓线:90,COLOR00AA55,LINETHICK2;
清仓线:95,COLOR0000AA,LINETHICK2;
LC:=REF(CLOSE,1);
RSI5:SMA(MAX(CLOSE-LC,0),N1,1)/SMA(Abs(CLOSE-LC),N1,1)*100,NODRAW,COLORFFAAFF;
RSI10:SMA(MAX(CLOSE-LC,0),N2,1)/SMA(ABS(CLOSE-LC),N2,1)*100,NODRAW,COLORDDAADD;
RSI20:SMA(MAX(CLOSE-LC,0),N3,1)/SMA(ABS(CLOSE-LC),N3,1)*100,NODRAW,COLORAA99AA;
DRAWBAND(RSI5,RGB(195,125,195),RSI10,RGB(0,130,50));
DRAWBAND(RSI10,RGB(165,95,165),RSI20,RGB(0,100,20));
{金叉死叉}
金叉:crOSS(RSI5,RSI20) AND CROSS(RSI10,RSI20),COLORRED,NODRAW;
DRAWTEXT(金叉,RSI5,'←'),COLORRED;
死叉:CROSS(RSI20,RSI10) AND CROSS(RSI20,RSI5),COLORGREEN,NODRAW;
DRAWTEXT(死叉,RSI5,'←'),COLORGREEN;
{RSI顶底背离}
RS:=BArslAST(REF(CROSS(RSI20,RSI5),1));
RS1:=REF(CLOSE,RS+1)RSI5 AND CROSS(RSI20,RSI5);
顶背离:IF(RS1,RSI5,DRAWNULL),CIRCLEDOT,COLORFFCC00;
STICKLINE(RS1,RSI5,RSI5*0.9,0,0),COLORFFCC00;
DRAWTEXT(RS1,RSI5*0.9,'顶背离'),COLORFFCC00;
S1:=BARSLAST(REF(CROSS(RSI5,RSI20),1));
S1A:=REF(CLOSE,S1+1)>CLOSE AND RSI5>REF(RSI5,S1+1) AND
CROSS(RSI5,RSI20);
底背离:IF(S1A,RSI5,DRAWNULL),CIRCLEDOT,COLOR6699FF;
STICKLINE(S1A,RSI5,RSI5*1.1,0,0),COLOR6699FF;
DRAWTEXT(S1A,RSI5*1.1,'底背离'),COLOR6699FF;
{RSI划线}
OB:=RSI5;
A1:=REF(OB,P)=HHV(OB,2*P+1);
B1:=FILTER(A1,P);
C1:=BacKSET(B1,P+1);
D1:=FILTER(C1,P);{高点}
A2:=REF(OB,P)=LLV(OB,2*P+1);
B2:=FILTER(A2,P);
C2:=BACKSET(B2,P+1);
D2:=FILTER(C2,P);{低点}
R11:=BACKSET(ISLASTBAR,BARSLAST(D1)+1);
S11:=R11>REF(R11,1);
压力线:DRAWLINE(D1,OB,S11,OB,1),LINETHICK1,COLORCC33CC;
T11:=BACKSET(ISLASTBAR,BARSLAST(D2)+1);
U11:=T11>REF(T11,1);
支撑线:DRAWLINE(D2,OB,U11,OB,1),COLOR00CCCC;
DRAWTEXT(CURRBARSCOUNT=60,25,'强弱用来看趋势 背离用来看顶底'),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=60,15,'支撑压力辨起落 设定周期参数 P'),COLORGREEN;

 

标签:RSI5,RSI,OB,CROSS,通达信,源码,RSI20,CLOSE,REF
From: https://www.cnblogs.com/zhibiao/p/18064019

相关文章

  • 通达信小牛寻底指标公式源码
    {通达信小牛寻底指标公式源码}VAR1:=((C-MA(C,6))/(MA(C,6)))*(100);VAR2:=((C-MA(C,12))/(MA(C,12)))*(100);VAR3:=((C-MA(C,24))/(MA(C,24)))*(100);VAR4:=(VAR1+(2)*(VAR2)+(3)*(VAR3))/6;VAR5:=MA(VAR4,3);XG:EVERY(VAR5<=(-10),7)ANDDYNAINFO(4)>0ANDC>1*REF(C,......
  • 通达信抄底攻击涨停指标公式源码
    {通达信抄底攻击涨停指标公式源码}VAR1:=(CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100;VAR2:=SMA(VAR1,3,1);VAR3:=SMA(VAR2,3,1);VAR4:=SMA(VAR3,3,1);K:VAR3,COLOR0000FF,LINETHICK2;D:VAR4,COLOR00FF00,LINETHICK2;VAR6:=crOSS(VAR3,VAR4)ANDVAR3<20;DR......
  • 通达信量底大资金副图指标抄底类指标
    {通达信量底大资金副图指标抄底类指标}VA:=IF(CLOSE>REF(CLOSE,1),VOL,-VOL);OBV:=SUM(IF(CLOSE=REF(CLOSE,1),0,VA),0);MAOBV:=MA(OBV,30);DIF:=(EMA(CLOSE,12)-EMA(CLOSE,26))*1;DEA:=(EMA(DIF,9))*1;MACD:=(DIF-DEA)*2,COLORSTICK;M:=CROSS(DIF,DEA);HJZ:=(3*C+H+L......
  • 通达信涨幅前兆指标公式源码
    {通达信涨幅前兆指标公式源码}VAR3:=LLV(HIGH,240);VAR4:=100*(CLOSE-VAR3)/VAR3;VAR5:=REF(LLV(CLOSE,480),1);VAR6:=REF(HHV(CLOSE,480),1);VAR7:=100*(CLOSE-VAR5)/(VAR6-VAR5);VAR8:=(CLOSE-LLV(CLOSE,981))/(HHV(CLOSE,981)-LLV(CLOSE,981))*100;VAR9:=(CLOS......
  • 通达信涨停信号指标公式源码
    {通达信涨停信号指标公式源码}B1:=(HHV(H,9)-C)/(HHV(H,9)-LLV(LOW,9))*100-70; B2:=SMA(B1,9,1)+100; B3:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100; B4:=SMA(B3,3,1); B5:=SMA(B4,3,1)+100; B6:=B5-B2; B7:IF(B6>60,B6-60,0);持有:STICKLINE(REF(B7,1)<b7,b7,r......
  • 通达信短炒买卖指标公式源码
    {通达信短炒买卖指标公式源码}VAR1:=((CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100+(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100+(CLOSE-MA(CLOSE,32))/MA(CLOSE,32)*100)/3;持币区域:VAR1,COLORFEDCBA;持股区域:IF(VAR1>0,VAR1,0),COLORRED;短顶:STICKLINE(VAR1>9ANDFILTER(VAR1<re......
  • 通达信提前买入指标公式源码
    {通达信提前买入指标公式源码}Var11:=EMA(HHV(HIGH,500),21);Var2:=EMA(HHV(HIGH,250),21);Var3:=EMA(HHV(HIGH,90),21);Var4:=EMA(LLV(LOW,500),21);Var5:=EMA(LLV(LOW,250),21);Var6:=EMA(LLV(LOW,90),21);Var7:=EMA((Var4*0.96+Var5*0.96+Var6*0.96+Var11*0.558+Var2......
  • 通达信追涨吃大肉指标公式源码
    {通达信追涨吃大肉指标公式源码}追涨:IF(FILTER((COUNT(crOSS((C-MA(C,5))/MA(C,5)*100,0),3)>=1AND(C-MA(C,30))/MA(C,30)*100>REF((C-MA(C,30))/MA(C,30)*100,1)ANDMA(C,5)>REF(MA(C,5),1)AND(C/REF(C,1)-1)*100>5ANDREF(C,1)<ma(c,30)),10),1,0),colorred,linet......
  • 通达信犀牛筹码集中指标公式源码
    {通达信犀牛筹码集中指标公式源码}X_1:=MA(CLOSE,5);X_2:=MA(CLOSE,10);X_3:=MA(CLOSE,20);X_4:=MA(CLOSE,30);X_5:=COST(94);X_6:=COST(90);X_7:=COST(80);X_8:=NOT(CODELIKE(2))ANDNOT(CODELIKE(4))ANDNOT(CODELIKE(3));X_9:=(X_5-X_7)/X_7*100;X_10:=MA(CLOSE......
  • 通达信支撑压力自动画线主图指标公式源码
    {通达信支撑压力自动画线主图指标公式源码}N:=5;STICKLINE(C>O,O,C,3,1),COLORRED;STICKLINE(C>O,H,C,0,0),COLORRED;STICKLINE(C>O,O,L,0,0),COLORRED;STICKLINE(C<o,o,c,3,1),colorff901e;STICKLINE(C<o,h,o,0,0),colorff901e;STICKLINE(C<o,c,l,0,0),colorff901e;......