RSI:=((SMA(MAX((CLOSE - LC),0),3,1) / SMA(ABS((CLOSE - LC)),3,1)) * 100);
FF:=EMA(CLOSE,3);
MA15:=EMA(CLOSE,21);
日:=150;昨前:=3;
高1:=REF(HHV(H,日),昨前);
低1:=REF(LLV(L,日),昨前);
H1:=高1-(高1-低1)*0.191;
H2:=高1-(高1-低1)*0.382;
H3:=高1-(高1-低1)*0.5;
H4:=高1-(高1-低1)*0.618;
H5:=高1-(高1-低1)*0.809;
顶:REFDATE(高1,DATE),COLORRED;
一0.809:REFDATE(H1,DATE),COLORYELLOW;
二0.618:REFDATE(H2,DATE),COLORMAGENTA;
三0.500:REFDATE(H3,DATE),COLORWHITE;
四0.382:REFDATE(H4,DATE),COLORGREEN;
五0.191:REFDATE(H5,DATE),COLORYELLOW;
低:REFDATE(低1,DATE),COLORRED;
BIAS1:=(C-MA(C,6))/MA(C,6)*100;
BIAS2:=(C-MA(C,12))/MA(C,12)*100;
BIAS3:=(C-MA(C,24))/MA(C,24)*100;
BIAS:=(BIAS1+2*BIAS2+3*BIAS3)/6;
乖离:=MA(BIAS,3);
DRAWTEXT(CROSS(BIAS,乖离) AND 乖离 -9,C,'---------BIAS底买'),COLORWHITE;
DRAWTEXT(CROSS(BIAS,乖离) AND 乖离 3,C,'---------BIAS顶'),COLORWHITE;
TY:=C;
Q1:=REF(TY,10)=HHV(TY,2*10+1); W1:=FILTER(Q1,10); P1:=BACKSET(W1,10+1); HD:=FILTER(P1,10);
Q2:=REF(TY,10)=LLV(TY,2*10+1); W2:=FILTER(Q2,10); P2:=BACKSET(W2,10+1); LD:=FILTER(P2,10);
{www.9m8.cn 九毛八公式指标网 股票软件下载网_最新股票指标公式}
M:=REF(C,BARSLAST(HD)); N:=REF(C,BARSLAST(LD));
T1:=BARSLAST(HD) BARSLAST(LD) AND NOT(HD) ;
T2:=BARSLAST(HD) BARSLAST(LD) AND NOT(LD);
波峰:IF(T1,M,M),COLORCYAN,POINTDOT;
STICKLINE(T1,M,M,9,0),COLORCYAN;
波谷:IF(T2,N,N),COLORGREEN,POINTDOT;
STICKLINE(T2,N,N,9,0),COLOR80FF00;
U:=7;
AA:=MA((2*CLOSE+HIGH+LOW)/4,5);
QQ:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);
DD:=DMA(CLOSE,QQ);
通道3:(1+U/100)*DD,LINETHICK2;
通道4:(1-U/100)*DD,COLORCYAN,LINETHICK2;
LC1:=REF(CLOSE,1);
RSII:=((SMA(MAX((CLOSE - LC1),0),3,1) / SMA(ABS((CLOSE - LC1)),3,1)) * 100);
FFF:=EMA(CLOSE,3);
PA15:=EMA(CLOSE,21);
DRAWTEXT(CROSS(FFF,PA15),(LOW * 0.99),'底背离'),COLORA6E500;
DRAWTEXT(CROSS(88,RSII),(HIGH * 1.02),'顶背离'),COLOR1880FF;