副图公式源码支持 手机/电脑
DIFF1:EMA(EMA(CLOSE,12)-EMA(CLOSE,26),5);
DEA1:EMA(DIFF1,9);MACD1:=CROSS(DIFF1,DEA1);
振幅:=(H-REF(C,1))/REF(C,1)*100;
M25:=MA(C,25);M60:=MA(C,60);
M90:=MA(C,90);M120:=MA(C,120);
GUP3:=(M25-M60)/M60*100;GUP4:=(M25-M90)/M90*100;
GUP5:=(M25-M120)/M120*100;GUP6:=IF(C>=O,C,O);
GUP7:=(H-GUP6)/GUP6*100;
GUP8:=(H-REF(C,10))/REF(C,10)*100;
GUP9:=(H-REF(C,11))/REF(C,11)*100;
GUP10:=(H-REF(C,12))/REF(C,12)*100;
GUP11:=(H-REF(C,13))/REF(C,13)*100;
GUP12:=(H-REF(C,14))/REF(C,14)*100;
GUP13:=(H-REF(C,15))/REF(C,15)*100;
GUP14:=(H-REF(C,16))/REF(C,16)*100;
GUP15:=(H-REF(C,17))/REF(C,17)*100;
GUP16:=(H-REF(C,18))/REF(C,18)*100;
GUP17:=(H-REF(C,19))/REF(C,19)*100;
GUP18:=(H-REF(C,20))/REF(C,20)*100;
GUP19:=(H-REF(C,21))/REF(C,21)*100;
GUP20:=100;GUA1:=30;
GUP21:=GUP8<GUP20 AND GUP9<GUP20 AND GUP10<GUP20 AND GUP11<GUP20 AND GUP12<GUP20 AND GUP13<GUP20 AND GUP14<GUP20 AND GUP15<GUP20 AND GUP16<GUP20 AND GUP17<GUP20 AND GUP18<GUP20 AND GUP19<GUP20;
GUA2:=(L-REF(H,6))/REF(H,6)*100;
GUA3:=(L-REF(H,7))/REF(H,7)*100;
GUA4:=(L-REF(H,8))/REF(H,8)*100;
GUA5:=(L-REF(H,9))/REF(H,9)*100;
GUA6:=(L-REF(H,10))/REF(H,10)*100;
GUA7:=(L-REF(H,11))/REF(H,11)*100;
GUA8:=(L-REF(H,12))/REF(H,12)*100;
GUA9:=(L-REF(H,13))/REF(H,13)*100;
GUA10:=(L-REF(H,14))/REF(H,14)*100;
GUA11:=(L-REF(H,15))/REF(H,15)*100;
GUA12:=(L-REF(H,16))/REF(H,16)*100;
GUA13:=(L-REF(H,17))/REF(H,17)*100;
GUA14:=(L-REF(H,18))/REF(H,18)*100;
GUA15:=(L-REF(H,19))/REF(H,19)*100;
GUA16:=(L-REF(H,20))/REF(H,20)*100;
GUA17:=(L-REF(H,21))/REF(H,21)*100;
GUA18:=GUA2<GUA1 AND GUA3<GUA1 AND GUA4<GUA1 AND GUA5<GUA1 AND GUA6<GUA1 AND GUA7<GUA1 AND GUA8<GUA1 AND GUA9<GUA1 AND GUA10<GUA1 AND GUA11<GUA1 AND GUA12<GUA1 AND GUA13<GUA1 AND GUA14<GUA1 AND GUA15<GUA1 AND GUA16<GUA1 AND GUA17<GUA1;
MID5:=MA(CLOSE,5);AA5:=MID5+2*STD(CLOSE,5),COLORRED;
MID10:=MA(CLOSE,10);AA10:=MID10+2*STD(CLOSE,10),COLORRED;
GUB1:=(H-REF(C,1))/REF(C,1)*100;
GUB2:=COUNT(GUB1>4.5,80 )>=5 AND COUNT(GUB1>3,60 )>=10;
GUC1:=MACD1 AND COUNT(M60>REF(M60,1),60)>=20 AND GUP3<10 AND GUB2 AND COUNT(GUP21,60)>=60 AND COUNT(GUA18,20)>=20 AND 振幅>3.5 AND L<M25 AND H >M25;
GUC2:= COUNT(M90>REF(M90,1),90)>=30 AND GUP4<10 AND GUB2 AND COUNT(GUP21,90)>=90 AND COUNT(GUA18,20)>=20 AND 振幅>3.5 AND L<M25 AND H >M25;
GUC3:=COUNT(M120>REF(M120,1),120)>=30 AND GUP5<10 AND GUB2 AND COUNT(GUP21,120)>=120 AND COUNT(GUA18,20)>=20 AND 振幅>3.5 AND L<M25 AND H >M25;
突:=GUC1 OR GUC2 OR GUC3 AND C>O;买:=突;
FF:=(H-REF(C,BARSLAST(买)))/REF(C,BARSLAST(买))*100;
GUD1:=FF>15 AND BARSLAST(买)<30 AND CROSS(DEA1,DIFF1);
GUD2:=FF>15 AND BARSLAST(买)<30 AND AA5<REF(AA5,1) AND REF(AA5,1) >=REF(AA5,2) AND REF(AA5,2) >=REF(AA5,3) AND AA10>=REF(AA10,1) AND REF(AA10,1) >=REF(AA10,2);
减:=GUD1 OR GUD2;
清:= FF<-20 AND BARSLAST(买)<30 AND CROSS(DEA1,DIFF1);
DRAWTEXT(买 AND COUNT(买,30)=1,DIFF1+0.3,'买入'),COLORRED;
DRAWICON(买 AND COUNT(买,30)=1 ,DIFF1,1);
DRAWTEXT(减 ,DIFF1-0.3,'减仓'),COLORGREEN;
DRAWICON(减,DIFF1,2);
DRAWTEXT(清,DIFF1+0.3,'清仓'),COLORGREEN;
选股公式源码
{选股公式:买入}
DIFF1:=EMA(EMA(CLOSE,12)-EMA(CLOSE,26),5);
DEA1:=EMA(DIFF1,9);MACD1:=CROSS(DIFF1,DEA1);
振幅:=(H-REF(C,1))/REF(C,1)*100;
M25:=MA(C,25);M60:=MA(C,60);
M90:=MA(C,90);M120:=MA(C,120);
GUP3:=(M25-M60)/M60*100;GUP4:=(M25-M90)/M90*100;
GUP5:=(M25-M120)/M120*100;GUP6:=IF(C>=O,C,O);
GUP7:=(H-GUP6)/GUP6*100;
GUP8:=(H-REF(C,10))/REF(C,10)*100;
GUP9:=(H-REF(C,11))/REF(C,11)*100;
GUP10:=(H-REF(C,12))/REF(C,12)*100;
GUP11:=(H-REF(C,13))/REF(C,13)*100;
GUP12:=(H-REF(C,14))/REF(C,14)*100;
GUP13:=(H-REF(C,15))/REF(C,15)*100;
GUP14:=(H-REF(C,16))/REF(C,16)*100;
GUP15:=(H-REF(C,17))/REF(C,17)*100;
GUP16:=(H-REF(C,18))/REF(C,18)*100;
GUP17:=(H-REF(C,19))/REF(C,19)*100;
GUP18:=(H-REF(C,20))/REF(C,20)*100;
GUP19:=(H-REF(C,21))/REF(C,21)*100;
GUP20:=100;GUA1:=30;
GUP21:=GUP8<GUP20 AND GUP9<GUP20 AND GUP10<GUP20 AND GUP11<GUP20 AND GUP12<GUP20 AND GUP13<GUP20 AND GUP14<GUP20 AND GUP15<GUP20 AND GUP16<GUP20 AND GUP17<GUP20 AND GUP18<GUP20 AND GUP19<GUP20;
GUA2:=(L-REF(H,6))/REF(H,6)*100;
GUA3:=(L-REF(H,7))/REF(H,7)*100;
GUA4:=(L-REF(H,8))/REF(H,8)*100;
GUA5:=(L-REF(H,9))/REF(H,9)*100;
GUA6:=(L-REF(H,10))/REF(H,10)*100;
GUA7:=(L-REF(H,11))/REF(H,11)*100;
GUA8:=(L-REF(H,12))/REF(H,12)*100;
GUA9:=(L-REF(H,13))/REF(H,13)*100;
GUA10:=(L-REF(H,14))/REF(H,14)*100;
GUA11:=(L-REF(H,15))/REF(H,15)*100;
GUA12:=(L-REF(H,16))/REF(H,16)*100;
GUA13:=(L-REF(H,17))/REF(H,17)*100;
GUA14:=(L-REF(H,18))/REF(H,18)*100;
GUA15:=(L-REF(H,19))/REF(H,19)*100;
GUA16:=(L-REF(H,20))/REF(H,20)*100;
GUA17:=(L-REF(H,21))/REF(H,21)*100;
GUA18:=GUA2<GUA1 AND GUA3<GUA1 AND GUA4<GUA1 AND GUA5<GUA1 AND GUA6<GUA1 AND GUA7<GUA1 AND GUA8<GUA1 AND GUA9<GUA1 AND GUA10<GUA1 AND GUA11<GUA1 AND GUA12<GUA1 AND GUA13<GUA1 AND GUA14<GUA1 AND GUA15<GUA1 AND GUA16<GUA1 AND GUA17<GUA1;
GUB1:=(H-REF(C,1))/REF(C,1)*100;
GUB2:=COUNT(GUB1>4.5,80 )>=5 AND COUNT(GUB1>3,60 )>=10;
GUC1:=MACD1 AND COUNT(M60>REF(M60,1),60)>=20 AND GUP3<10 AND GUB2 AND COUNT(GUP21,60)>=60 AND COUNT(GUA18,20)>=20 AND 振幅>3.5 AND L<M25 AND H >M25;
GUC2:= COUNT(M90>REF(M90,1),90)>=30 AND GUP4<10 AND GUB2 AND COUNT(GUP21,90)>=90 AND COUNT(GUA18,20)>=20 AND 振幅>3.5 AND L<M25 AND H >M25;
GUC3:=COUNT(M120>REF(M120,1),120)>=30 AND GUP5<10 AND GUB2 AND COUNT(GUP21,120)>=120 AND COUNT(GUA18,20)>=20 AND 振幅>3.5 AND L<M25 AND H >M25;
突:=GUC1 OR GUC2 OR GUC3 AND C>O;买:=突;
买入:买 AND COUNT(买,30)=1; |