C:=REF(CLOSE,1);
RS1:=SMA(MAX(CLOSE-LC,0),M,1)/SMA(ABS(CLOSE-LC),M,1)*100;
SM:MA(RS1,20),COLORFF00FF,NODRAW;
SU:SM+2*STD(RS1,20),COLORFFFF00,NODRAW;
SD:SM-2*STD(RS1,20),COLOR00FF00,NODRAW;
ATR:=MA(MAX(MAX((RS1-RS1),ABS(REF(RS1,1)-RS1)),ABS(REF(RS1,1)-RS1)),15);
VM:MA(RS1,N1),COLORFF00FF,NODRAW;
VU:VM+2.3*ATR,COLORFFFFFF,NODRAW;
VD:VM-2.1*ATR,COLOR00FFFF,NODRAW;
DRAWBAND(SU,RGB(0,150,130),SD,RGB(0,150,130));
DRAWBAND(VU,RGB(220,220,220),VD,RGB(220,220,220));
DRAWTEXT(ISLASTBAR AND RSI>REF(RSI,1),VM,' ▲'),COLORDD00FF;
DRAWTEXT(ISLASTBAR AND RSI<REF(RSI,1),VM,' ▼'),COLOR00EE00;
MA1:MA(RS1,N1),COLOR000000;
MA2:MA(RS1,N2),COLORFF0000,LINETHICK2;
RSI:RS1,COLORRED,LINETHICK2;
```````````````````````````````````````````````````````````````````````````
1、RSI波幅通道(RSIVB)
第一步,设置:
参数 最小 最大 缺省
M 2 99 12
N 2 99 6
额外Y轴分界:
值1:25 值2:50 值3:75
第二步,复制/粘贴源码:
LC:=REF(CLOSE,1);
RS1:=SMA(MAX(CLOSE-LC,0),M,1)/SMA(ABS(CLOSE-LC),M,1)*100;
ATR:=MA(MAX(MAX((RS1-RS1),ABS(REF(RS1,1)-RS1)),ABS(REF(RS1,1)-RS1)),15);
MD:MA(RS1,N),COLOR0000FF,NODRAW;
VU:MD+2.3*ATR,COLORAABB00,NODRAW;
VD:MD-2.1*ATR,COLORBBAA00,NODRAW;
DRAWBAND(VU,RGB(0,100,220),VD,RGB(0,100,220));
{STICKLINE(C>0,UP,DN,6,0),COLORAA0000};
MR:MD,COLORRED;
RSI:RS1,COLORFFFFFF,LINETHICK2; |