TYP:=(HIGH+LOW+CLOSE)/3; cci:=((TYP-MA(TYP,30))/(0.015*AVEDEV(TYP,30))+200)/4;{引用cci指标} RSV:=(CLOSE-LLV(LOW,30))/(HHV(HIGH,30)-LLV(LOW,30))*100; K:=SMA(RSV,3,1);{引用kd指标} LC:=REF(CLOSE,1); RSI:=(SMA(MAX(CLOSE-LC,0),30,1)/SMA(ABS(CLOSE-LC),30,1)*100-40)*3.5;{引用rsi指标} TR:= EMA(EMA(EMA(CLOSE,30),30),30); TRIX:=((TR-REF(TR,1))/REF(TR,1)*100+0.5)*100;{引用trix指标} hsl:=SUMBARS(vol,capital);{引用换手率指标} vr:=SUM(IF(CLOSE>LC,VOL,0),30)/SUM(IF(CLOSE<=LC,VOL,0),30)*100;{引用vr指标} y1:=(cci+k+rsi+trix+hsl+vr);{汇总为一条指标线} DIFF:=EMA(y1,12)-EMA(y1,26);{把原close改为y1} DEA:=EMA(DIFF,9); kdj:=3*diff-2*dea;{利用kdj中j线快的原理} MACD:=(kdj-0);{引用macd指标} ys1:dea; ys2:macd,colorstick; macd;STICKLINE(ys1>macd,ys1,macd,1,0),coloryellow; STICKLINE(ys1<macd,ys1,macd,1,0), colorblue ; 50,pointdot;-50,pointdot; tj:=cross(macd,0); STICKLINE(tj,50,-50,1,1 ); 0; TYP:=(HIGH+LOW+CLOSE)/3; cci:=((TYP-MA(TYP,30))/(0.015*AVEDEV(TYP,30))+200)/4;{引用cci指标} RSV:=(CLOSE-LLV(LOW,30))/(HHV(HIGH,30)-LLV(LOW,30))*100; K:=SMA(RSV,3,1);{引用kd指标} LC:=REF(CLOSE,1); RSI:=(SMA(MAX(CLOSE-LC,0),30,1)/SMA(ABS(CLOSE-LC),30,1)*100-40)*3.5;{引用rsi指标} TR:= EMA(EMA(EMA(CLOSE,30),30),30); TRIX:=((TR-REF(TR,1))/REF(TR,1)*100+0.5)*100;{引用trix指标} hsl:=SUMBARS(vol,capital);{引用换手率指标} vr:=SUM(IF(CLOSE>LC,VOL,0),30)/SUM(IF(CLOSEmacd,ys1,macd,1,0),coloryellow; STICKLINE(ys1<macd,ys1,macd,1,0), colorblue ; 50,pointdot;-50,pointdot; tj:=cross(macd,0); STICKLINE(tj,50,-50,1,1 ); 0;股票论坛 www.55188.com |
|