「通达信」洋洋炒短线及选股指标公式

{cci}
TYP:=(high LOW close)/3;
CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));
{LON}
DIF:=ema(CLOSE,12)-EMA(CLOSE,26);
dea:=EMA(DIF,9);
macd:=(DIF-DEA)*2;
{ROC}
ROC:=100*(CLOSE-REF(CLOSE,12))/REF(CLOSE,12);
MAROC:=MA(ROC,6);
A1:=LONGcroSS(-150,REF(CCI,1),30);
A2:=LONGCROSS(-5,REF(ROC,1),30);
A3:=LONGCROSS(DIF,DEA-0.01,5) AND DIF<0;
A4:=IF(A3,COUNT(A1 OR A2,10)>=1,DRAWNULL);
stICKLINE(A4,0,1,4,0)COLOR80FFFF;
DRAWTEXT(A4,0.5,出)COLOR0000FF;
DRAWTEXT(A4,0.1,现)COLOR0000FF;
B1:=A1 OR A2;
STICKLINE(B1,0,1,1,0)COLORFFFF00;

{
选股公式:

N:=30;
TYP:=(HIGH LOW CLOSE)/3;
CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=(DIF-DEA)*2;
ROC:=100*(CLOSE-REF(CLOSE,12))/REF(CLOSE,12);
MAROC:=MA(ROC,6);
A1:=LONGCROSS(-150,REF(CCI,1),30);
A2:=LONGCROSS(-5,REF(ROC,1),30);
A3:=LONGCROSS(DIF,DEA,5) AND DIF<=0;
A4:=IF(A3,COUNT(A1 OR A2,10)>=1,DRAWNULL);
IF(CUrrBARSCOUNT<=N,A4,0);
}

分享: