以下是通达信与庄共舞主图 选股公式
主图
M20:MA(C,20);
M10:MA(C,10);
M60:MA(C,60);
M5:MA(C,5);
T:=BARSLAST(C>REF(C,1)*1.095 AND C=H);
T2:=BARSLAST(C<REF(C,1)*1.095 AND C>REF(C,1)*1.08);
T3:=BARSLAST(C<REF(C,1)*1.08 AND C>REF(C,1)*1.07);
T4:=BARSLAST(C<REF(C,1)*1.07 AND C>REF(C,1)*1.06);
T5:=BARSLAST(C<REF(C,1)*1.06 AND C>REF(C,1)*1.05);
TJ1:=COUNT(T=0,100)=0;
TJ2:=COUNT(T2=0,100)=0;
TJ3:=COUNT(T3=0,100)=0;
TJ4:=COUNT(T4=0,100)=0;
TJ5:=COUNT(T5=0,100)=0;
TJA:=C>REF(C,1)*1.05;
AA:=REF(T,1)>100 AND REF(T2,1)>100 AND REF(T3,1)>100 AND REF(T4,1)>100 AND REF(T5,1)>80 AND TJA;
HHM:=HHV(MACD.MACD*100,200);
LLM:=LLV(MACD.MACD*100,200);
D1:=MIN(MIN(M5,M10),M20)<M60;
D3:=MIN(MIN(M5,M10),M20)>M60;
XGT:=BARSLAST(AA AND HHM<60 AND LLM>-55);
D6:=BARSSINCEN(MIN(MIN(M5,M10),M20)>M60,XGT+1);
XG:=CROSS((XGT=0 AND D3) OR D6=0,0.5);
TAA:=COUNT(XG,30)=1 AND XG;
TJ:=COUNT(XG,30)=2 AND XG;
STICKLINE(TAA,C,O,1.5,0),COLORYELLOW;
STICKLINE(TAA,H,L,0,0),COLORYELLOW;
DRAWTEXT(TAA,L*0.95,'建仓'),COLORYELLOW;
STICKLINE(TJ,C,O,1.5,0),COLORLIMAGENTA;
STICKLINE(TJ,H,L,0,0),COLORLIMAGENTA;
DRAWTEXT(TJ,L*0.95,'拉升'),COLORLIMAGENTA;
幅图
M20:=MA(C,20);
M10:=MA(C,10);
M60:=MA(C,60);
M5:=MA(C,5);
T:=BARSLAST(C>REF(C,1)*1.095 AND C=H);
T2:=BARSLAST(C<REF(C,1)*1.095 AND C>REF(C,1)*1.08);
T3:=BARSLAST(C<REF(C,1)*1.08 AND C>REF(C,1)*1.07);
T4:=BARSLAST(C<REF(C,1)*1.07 AND C>REF(C,1)*1.06);
T5:=BARSLAST(C<REF(C,1)*1.06 AND C>REF(C,1)*1.05);
TJ1:=COUNT(T=0,100)=0;
TJ2:=COUNT(T2=0,100)=0;
TJ3:=COUNT(T3=0,100)=0;
TJ4:=COUNT(T4=0,100)=0;
TJ5:=COUNT(T5=0,100)=0;
TJA:=C>REF(C,1)*1.05;
AA:=REF(T,1)>100 AND REF(T2,1)>100 AND REF(T3,1)>100 AND REF(T4,1)>100 AND REF(T5,1)>80 AND TJA;
HHM:=HHV(MACD.MACD*100,200);
LLM:=LLV(MACD.MACD*100,200);
D1:=MIN(MIN(M5,M10),M20)<M60;
D3:=MIN(MIN(M5,M10),M20)>M60;
XGT:=BARSLAST(AA AND HHM<60 AND LLM>-55);
D6:=BARSSINCEN(MIN(MIN(M5,M10),M20)>M60,XGT+1);
XG:=CROSS((XGT=0 AND D3) OR D6=0,0.5);
TAA:=COUNT(XG,30)=1 AND XG;
TJ:=COUNT(XG,30)=2 AND XG;
STICKLINE(TAA,0,8,1.5,0),COLORYELLOW;
STICKLINE(TJ,0,8,1.5,0),COLORLIMAGENTA;
选股
M20:=MA(C,20);
M10:=MA(C,10);
M60:=MA(C,60);
M5:=MA(C,5);
T:=BARSLAST(C>REF(C,1)*1.095 AND C=H);
T2:=BARSLAST(C<REF(C,1)*1.095 AND C>REF(C,1)*1.08);
T3:=BARSLAST(C<REF(C,1)*1.08 AND C>REF(C,1)*1.07);
T4:=BARSLAST(C<REF(C,1)*1.07 AND C>REF(C,1)*1.06);
T5:=BARSLAST(C<REF(C,1)*1.06 AND C>REF(C,1)*1.05);
TJ1:=COUNT(T=0,100)=0;
TJ2:=COUNT(T2=0,100)=0;
TJ3:=COUNT(T3=0,100)=0;
TJ4:=COUNT(T4=0,100)=0;
TJ5:=COUNT(T5=0,100)=0;
TJA:=C>REF(C,1)*1.05;
AA:=REF(T,1)>100 AND REF(T2,1)>100 AND REF(T3,1)>100 AND REF(T4,1)>100 AND REF(T5,1)>80 AND TJA;
HHM:=HHV(MACD.MACD*100,200);
LLM:=LLV(MACD.MACD*100,200);
D1:=MIN(MIN(M5,M10),M20)<M60;
D3:=MIN(MIN(M5,M10),M20)>M60;
XGT:=BARSLAST(AA AND HHM<60 AND LLM>-55);
D6:=BARSSINCEN(MIN(MIN(M5,M10),M20)>M60,XGT+1);
XG:CROSS((XGT=0 AND D3) OR D6=0,0.5);