A:=SUMBARS(V,CAPITAL*1);{累计换手=99.99%的周期}
A1:=SUM(COST(10),A)/A;{在A周期里获利10%的平均价}
A2:=SUM(COST(20),A)/A;{在A周期里获利20%的平均价}
A3:=SUM(COST(30),A)/A;{在A周期里获利30%的平均价}
A4:=SUM(COST(40),A)/A;{在A周期里获利40%的平均价}
A5:=SUM(COST(50),A)/A;{在A周期里获利50%的平均价}
庄家成本:(5*A1+4*A2+3*A3+2*A4+A5)/15,COLORFF9900, CIRCLEDOT;{求出庄家成本};
DRAWTEXT(ISLASTBAR,庄家成本,A5),COLORYELLOW;
M1:MA(C,25);M2:MA(C,99);VA:=CLOSE/REF(CLOSE,3)>=1.1;
B4:=VA AND COUNT(VA,2)=1;VA3:=CLOSE>REF(CLOSE,1);
VAR4:=CLOSE/REF(CLOSE,1)>1.05 AND HIGH/CLOSE<1.01 AND VA3>0;
擒牛:=FILTER(VAR4,1) AND B4 AND CROSS(C,M1) AND CROSS(C,M2) AND CROSS(C,庄家成本);
五日乖离率:=(C-MA(C,5))/MA(C,5)*100;
速度5:=SMA(EMA((MA(C,5)-REF(MA(C,5),1))/REF(MA(C,5),1),3)*100,3,1);
加速度5:=EMA((速度5-REF(速度5,1)),3);
AA30:=MA(C,30);
三拾日乖离率:=(C-AA30)/AA30*100;
MR:=COUNT(CROSS(五日乖离率,0),3)>=1 AND 三拾日乖离率>REF(三拾日乖离率,1) AND MA(C,5)>REF(MA(C,5),1) AND (C/REF(C,1)-1)*100>5 AND REF(C,1)<AA30;
牛决:=FILTER(MR,10) AND 擒牛 COLORRED;DRAWTEXT(牛决,L*0.9,'伸手拿钱')COLORYELLOW;DRAWICON(牛决,L*0.96,9);R:=(CLOSE-LLV(LOW,10))/(HHV(HIGH,10)-LLV(LOW,10))*100;
RR:=(R/2+22)*1;
AA:=EMA(VOL,13);
B:=EMA(AMOUNT,13);
X:=((B/AA)/100);
Y:=(((CLOSE-X)/X)*100);
Z:=((Y<(0))AND ZXNH);
启动:=IF(Z AND R<RR-2,1,0),COLORRED;
DRAWTEXT(启动,L*0.9,'启动')COLORRED;DRAWICON(启动,L*0.96,1);
AA13:=MA(C,13)COLORGREEN;AA21:=MA(C,21)COLORBLUE;DRAWTEXT(CROSS(AA13,AA21),H*1.02,'死叉');DRAWTEXT_FIX(1,0,0.1,0,'三少无未来作品'),COLORYELLOW;