M:=1; N:=5; A:=LLV(DMA(CLOSE,vol/CAPITAL),120); XG1:=(200*(CLOSE-A)/A)>=28; RSV:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100; K1:=SMA(RSV,10,1); D3:=SMA(K1,5,1); KK:=INTPART(K1); DD:=INTPART(D3); TFXXS:=KK+DD; TGLXS:=(TFXXS-REF(TFXXS,1))*10>=0; LC:=REF(CLOSE,1); CZX:=SMA(MAX(CLOSE-LC,0),2,1)/SMA(Abs(CLOSE-LC),2,1)*100; ZT1:=IF(REF(C,1)*1.1-C< 0.01 ,1,0); ZCX2:=45; CDX:=25; HH:=COUNT(ZT1,N)>=1; PP2:=CZX< ZCX2 AND REF(CZX,1)>ZCX2 AND C>MA(C,21) AND HH AND MA(C,13)>REF(MA(C,13),1); PP3:=CZX< CDX AND REF(CZX,1)>CDX AND C>MA(C,21) AND HH AND MA(C,13)>REF(MA(C,13),1);
跌停:=(C<=DTPRICE(REF(C,1),0.1)); DT3:=COUNT(跌停,4)>0; 去除:=NOT(DT3); XG2:=PP2 OR PP3 OR REF(PP2 OR PP3,M) AND 去除; 买线:=MA(CLOSE,9); 卖线:=MA(CLOSE,20); BU:=crOSS(买线,卖线);
建仓:=DRAWTEXT(BU,L-0.1,'建仓'); EMA13:=EMA(C,13); EMA34:=EMA(C,34); EMA55:=EMA(C,55); ZT:=(REF(C,1)*1.095-C)< 0.01 AND C=H; BR1:=COUNT(BETWEEN((C-REF(C,1))/REF(C,1)*100,0,5) ,5)=5; BR2:=ABS((EMA13-EMA34)+(EMA34-EMA55))/C< 0.2; BR3:=C>EMA55 AND (REF(C,1)< REF(EMA55,1) OR REF(C,2)< REF(EMA55,2) OR REF(C,3)< REF(EMA55,3) OR REF(C,4)< REF(EMA55,4) OR REF(C,5)< REF(EMA55,5)); BR4:=FILTER(BR1 AND BR2 AND BR3,10);
上升:=DRAWTEXT(BR4,L-0.09,'上升'); DR1:=EMA13>EMA34 AND EMA34< EMA55; DR2:=BARSLAST(CROSS(C,EMA55) ); DR3:=H=HHV(H,DR2); DR4:=BARSLAST(DR3); DR5:=COUNT(O>C AND C< REF(C,1) AND C>EMA55 AND BETWEEN((C-EMA55)/EMA55,0,0.02),DR4)=1; DR6:=C>REF(C,1); DR7:= DR1 AND DR5 AND DR6; DR8:=DR7 AND FILTER(DR7 ,10); 出击:=DRAWTEXT(DR8,L-0.09,'出击'); FR:=BARSLAST(REF(CROSS(EMA34,EMA13),1)) AND CROSS(EMA13,EMA34);
加仓:=DRAWTEXT(FR,L-0.09,'加仓'); HR2:=EMA13>=REF(EMA13,3) AND EMA34>=REF(EMA34,1) AND EMA55>=REF(EMA55,1) AND CROSS(C,EMA13) AND CROSS(C,EMA34) AND CROSS(C,EMA55); HR3:=HR2 AND FILTER(HR2 ,10); 推进:=DRAWTEXT(HR3,L-0.3,'推进'); HH2:=COUNT(ZT AND NOT(C/REF(C,1)>1.095 AND H=O),7)>=2; HH3:=COUNT(TGLXS,5)>=5; XG5:=XG2 OR 建仓 OR 推进 OR 上升 OR 加仓 OR 出击; XG:XG5 AND HH2 AND XG1 AND HH3 AND 去除;
M:=1;
N:=5;
A:=LLV(DMA(CLOSE,vol/CAPITAL),120);
XG1:=(200*(CLOSE-A)/A)>=28;
RSV:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100;
K1:=SMA(RSV,10,1);
D3:=SMA(K1,5,1);
KK:=INTPART(K1);
DD:=INTPART(D3);
TFXXS:=KK+DD;
TGLXS:=(TFXXS-REF(TFXXS,1))*10>=0;
LC:=REF(CLOSE,1);
CZX:=SMA(MAX(CLOSE-LC,0),2,1)/SMA(Abs(CLOSE-LC),2,1)*100;
ZT1:=IF(REF(C,1)*1.1-C< 0.01 ,1,0);
ZCX2:=45;
CDX:=25;
HH:=COUNT(ZT1,N)>=1;
PP2:=CZX< ZCX2 AND REF(CZX,1)>ZCX2 AND C>MA(C,21) AND HH AND MA(C,13)>REF(MA(C,13),1);
PP3:=CZX< CDX AND REF(CZX,1)>CDX AND C>MA(C,21) AND HH AND MA(C,13)>REF(MA(C,13),1);
跌停:=(C<=DTPRICE(REF(C,1),0.1));
DT3:=COUNT(跌停,4)>0;
去除:=NOT(DT3);
XG2:=PP2 OR PP3 OR REF(PP2 OR PP3,M) AND 去除;
买线:=MA(CLOSE,9);
卖线:=MA(CLOSE,20);
BU:=crOSS(买线,卖线);
建仓:=DRAWTEXT(BU,L-0.1,'建仓');
EMA13:=EMA(C,13);
EMA34:=EMA(C,34);
EMA55:=EMA(C,55);
ZT:=(REF(C,1)*1.095-C)< 0.01 AND C=H;
BR1:=COUNT(BETWEEN((C-REF(C,1))/REF(C,1)*100,0,5) ,5)=5;
BR2:=ABS((EMA13-EMA34)+(EMA34-EMA55))/C< 0.2;
BR3:=C>EMA55 AND (REF(C,1)< REF(EMA55,1) OR REF(C,2)< REF(EMA55,2) OR REF(C,3)< REF(EMA55,3) OR REF(C,4)< REF(EMA55,4) OR REF(C,5)< REF(EMA55,5));
BR4:=FILTER(BR1 AND BR2 AND BR3,10);
上升:=DRAWTEXT(BR4,L-0.09,'上升');
DR1:=EMA13>EMA34 AND EMA34< EMA55;
DR2:=BARSLAST(CROSS(C,EMA55) );
DR3:=H=HHV(H,DR2);
DR4:=BARSLAST(DR3);
DR5:=COUNT(O>C AND C< REF(C,1) AND C>EMA55 AND BETWEEN((C-EMA55)/EMA55,0,0.02),DR4)=1;
DR6:=C>REF(C,1);
DR7:= DR1 AND DR5 AND DR6;
DR8:=DR7 AND FILTER(DR7 ,10);
出击:=DRAWTEXT(DR8,L-0.09,'出击');
FR:=BARSLAST(REF(CROSS(EMA34,EMA13),1)) AND CROSS(EMA13,EMA34);
加仓:=DRAWTEXT(FR,L-0.09,'加仓');
HR2:=EMA13>=REF(EMA13,3) AND EMA34>=REF(EMA34,1) AND EMA55>=REF(EMA55,1) AND CROSS(C,EMA13) AND CROSS(C,EMA34) AND CROSS(C,EMA55);
HR3:=HR2 AND FILTER(HR2 ,10);
推进:=DRAWTEXT(HR3,L-0.3,'推进');
HH2:=COUNT(ZT AND NOT(C/REF(C,1)>1.095 AND H=O),7)>=2;
HH3:=COUNT(TGLXS,5)>=5;
XG5:=XG2 OR 建仓 OR 推进 OR 上升 OR 加仓 OR 出击;
XG:XG5 AND HH2 AND XG1 AND HH3 AND 去除;