九毛八公式指标
老师您好!网上找了一个CCI和RSI的公式,请您改成通达信选股公式,谢谢! CC:=(-2*REF(C,3)+3*REF(C,2)+6*REF(C,1)+7*C)/14; T1:=MA(CC,1); Q:=14; TYP:=(HIGH+LOW+CLOSE)/3; CCI:=(TYP-MA(TYP,Q))/(0.015*AVEDEV(TYP,Q)); N1:=6; N2:=12; N3:=24; LC:=REF(CLOSE,1); RSI1:=SMA(MAX(CLOSE-LC,0),N1,1)/SMA(ABS(CLOSE-LC),N1,1)*100; RSI2:=SMA(MAX(CLOSE-LC,0),N2,1)/SMA(ABS(CLOSE-LC),N2,1)*100; RSI3:=SMA(MAX(CLOSE-LC,0),N3,1)/SMA(ABS(CLOSE-LC),N3,1)*100; RSIDT:=C>T1 AND RSI1>REF(RSI1,1) AND RSI2>REF(RSI2,1) AND RSI3>REF(RSI3,1); DRAWICON(CCI<-130 and rsidt not(ref(rsidt,1)),(l * 0.996),11),linethick1;
编写方法:
CC:=(-2*REF(C,3)+3*REF(C,2)+6*REF(C,1)+7*C)/14;
T1:=MA(CC,1); Q:=14; TYP:=(HIGH+LOW+CLOSE)/3; cci:=(TYP-MA(TYP,Q))/(0.015*AVEDEV(TYP,Q)); N1:=6; N2:=12; N3:=24; LC:=REF(CLOSE,1); rsi1:=SMA(MAX(CLOSE-LC,0),N1,1)/SMA(ABS(CLOSE-LC),N1,1)*100; RSI2:=SMA(MAX(CLOSE-LC,0),N2,1)/SMA(ABS(CLOSE-LC),N2,1)*100; RSI3:=SMA(MAX(CLOSE-LC,0),N3,1)/SMA(ABS(CLOSE-LC),N3,1)*100; RSIDT:=C>T1 AND RSI1>REF(RSI1,1) AND RSI2>REF(RSI2,1) AND RSI3>REF(RSI3,1); {DRAWICON(CCI<-130 AND RSIDT AND NOT(REF(RSIDT,1)),(L * 0.996),11),LINETHICK1;} XG:CCI<-130 AND RSIDT AND NOT(REF(RSIDT,1));
-130>