通达信公式:跑赢大盘
MID:=REF(HIGH+LOW,1)/2;
CRR:=SUM(MAX(0,HIGH-MID),26)/SUM(MAX(0,MID-LOW),26)*100;
A3:=(INDEXC-MA(INDEXC,3))/MA(INDEXC,3)*100;
A6:=(INDEXC-MA(INDEXC,6))/MA(INDEXC,6)*100;
A12:=(INDEXC-MA(INDEXC,12))/MA(INDEXC,12)*100;
A24:=(INDEXC-MA(INDEXC,24))/MA(INDEXC,24)*100;
A:=(A3+A6+A12+A24)/4*10;
B3:=(C-MA(C,3))/MA(C,3)*100;
B6:=(C-MA(C,6))/MA(C,6)*100;
B12:=(C-MA(C,12))/MA(C,12)*100;
B24:=(C-MA(C,24))/MA(C,24)*100;
B:=(B6 + B12 +B24)/4*10;
EMA12:=EMA(C,12);
EMA55:=EMA(C,55);
FXX:=(EMA12-EMA55)*100,;
TJ:=B>1 AND B>A AND FXX>50 AND FXX>B AND UPNDAY(B,3) ;
TJ2:=COUNT(TJ>0,21);
跑赢大盘:TJ AND REF(TJ2,1)<1;