这个是飞狐的一个主图,它的好处是方便看RSI背离的提示作用。我想用在文华财经系统里,那个wh6或wh3里,看期货用。。。请懂文华财经指标的朋友给改一下。。万分感谢!!
H1:EMA(CLOSE,8),linethick2,colorwhite;
H2:EMA(H1,20),linethick2,coloryellow;
Var1:=(HHV(HIGH,36)-CLOSE)/(HHV(HIGH,36)-LLV(LOW,36))*100;
Var2:=SMA(Var1,5,1);
Var3:=SMA(Var2,8,1);
Var4:=CROSS(Var2,Var3) AND Var3<20;
Var5:=CLOSE>LLV(CLOSE,60)+0.3*LLV(CLOSE,60) AND Var4;
Var6:=IF(CLOSE>1000,Var4,Var5);
MA5:EMA(CLOSE,5),colorwhite;
MA10:EMA(CLOSE,10),coloryellow;
MA20:EMA(CLOSE,20),color000fff;
MA30:EMA(CLOSE,30),colorblue;
MA60:EMA(CLOSE,60),colorgreen;
MA90:EMA(CLOSE,90),colormagenta;
MA120:EMA(CLOSE,120),linethick2,colorred;
MA250:EMA(CLOSE,250),linethick2,colorffff00;
MA500:EMA(CLOSE,500),linethick2,colorff0088;
DRAWICON(CROSS(H1,H2)AND CLOSE<EMA(CLOSE,60) ,LOW,1);
DRAWICON(Var6,H,2);
STICKLINE(H1>H2,H1,H2,1,0.8),COLORRED;
STICKLINE(H1<H2,H1,H2,1,0.8),COLORGREEN;
A3:=BARSLAST(ref(cross("RSI.RSI1","RSI.RSI2"),1));
B3:=ref(c,A3+1)>c and ref("RSI.RSI1",A3+1)<"RSI.RSI1" and cross("RSI.RSI1","RSI.RSI2");
DRAWTEXT(FILTER(B3>0,5),l,'Rb'),COLORCYAN;
C3:=BARSLAST(ref(cross("RSI.RSI2","RSI.RSI1"),1));
D3:=ref(c,C3+1)<c and ref("RSI.RSI1",C3+1)>"RSI.RSI1" and cross("RSI.RSI2","RSI.RSI1");
DRAWTEXT(FILTER(D3>0,5),h+0.1,'Rt'),COLORMAGENTA;;
[ 本帖最后由 logoslogos 于 2013-10-10 10:31 编辑 ] |