在绝底反弹和金叉选股处做个选股公式

[复制链接]
查看42 | 回复0 | 2022-7-24 07:21:38 | 显示全部楼层 |阅读模式

原公式:

涨幅1%:=(C-REF(C,1))/REF(C,1)*100;
 开盘封涨停:=O/REF(C,1)<1.098;
 A4:=LLV(L,34);
 XD:=SMA(ABS(L-REF(L,1)),34,1);
 CD:=SMA(MAX(L-REF(L,1),0),34,2);
 收盘买:=-(EMA(IF(L<=A4,XD/CD,-3),9));
 反弹:=收盘买<0 AND 收盘买>REF(收盘买,1) AND REF(EVERY(收盘买<REF(收盘买,1),3),1);
 关注:=反弹 AND 涨幅1%>3 AND 涨幅1%<7;
 小追涨:=(((((MA(CLOSE,1) + MA(CLOSE,3)) + MA(CLOSE,5)) + MA(CLOSE,7)) + MA(CLOSE,9)) / 5);
 WW:=(((((MA(CLOSE,2) + MA(CLOSE,4)) + MA(CLOSE,6)) + MA(CLOSE,8)) + MA(CLOSE,10)) / 5);
 AY2:=EMA(小追涨,3);
 BY:=EMA(WW,10);
 VARY2:=EMA(AMOUNT,1)/EMA(VOL,1)/100;
 AA2:=DMA(AY2,VARY2);
 BB2:=DMA(BY,VARY2);
 VAR29:=MAX((2 * (AA2 - BB2)),0) * 100;
 NHSH:=EMA(VAR29,3);
 选股:=REF(NHSH,1)=0 AND NHSH>0 AND 涨幅1%>3;
 底部启动:(选股 AND COUNT(关注,10)=1 AND 开盘封涨停)*40,LINETHICK3;
 DRAWTEXT(ISLASTBAR,15,'底启'),COLORRED;
 {绝底反弹}
 P1:=EMA((CLOSE-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55))*100,5);
 P2:=(HHV(HIGH,55)-LLV(LOW,55))/EMA((CLOSE-LLV(LOW,55)),5);
 P3:=CROSS(P2,P1);
 P4:=REF(P2,2)<REF(P2,1) AND P2<REF(P2,1);
 P5:=COUNT(P3,7)>0 AND P4;
 P6:=3*SMA((CLOSE-LLV(LOW,89))/(HHV(HIGH,89)-LLV(LOW,89))*100,5,1)-2*SMA((CLOSE-LLV(LOW,89))/(HHV(HIGH,89)-LLV(LOW,89))
 *100,5,1);
 P7:= (CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34))*100;
 MW:= EMA(P6,5);
 NU:=(CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34))*100;
 NU0:=SMA(NU,3,1);
 NU00:=SMA(NU0,3,1);
 NU10:=3*NU0-2*NU00;
 NU1:=EMA(3*NU0-2*NU00,4);
 NU2:=SMA(NU1,5,1);
 NW:=MA(3*SMA(P7,6,1)-2*SMA(SMA(P7,5,1),5,1),2);
 HW:=CROSS(NW,0) AND MW<56;
 DP:=IF(P5 AND COUNT(P5,5)=1,1,0);
 绝底反弹:((HW AND DP) OR ((CROSS(IF(P6<3 AND NU2<5 AND NW<4,1,0),0.5)) AND LLV(L,34)/HHV(H,144)<0.78))*40,LINETHICK3;
 DRAWTEXT(ISLASTBAR,25,'底弹'),COLORRED;
 {MACD月金叉}
 五:=MA(CLOSE,5);
 年1:=MA(CLOSE,240);
 条件12:=五<年1;
 DIFM:="MACD.DIF#MONTH";
 DEAM:="MACD.DEA#MONTH";
 FCB:=FILTER(CROSS(DIFM,DEAM),0);
 金叉选股:(CROSS("MACD.DIF#MONTH","MACD.DEA#MONTH") AND 条件12)*40,LINETHICK3;
DRAWTEXT(ISLASTBAR,35,'月叉'),COLORRED;
 

=======================

绝底反弹
 P1:=EMA((CLOSE-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55))*100,5);
 P2:=(HHV(HIGH,55)-LLV(LOW,55))/EMA((CLOSE-LLV(LOW,55)),5);
 P3:=CROSS(P2,P1);
 P4:=REF(P2,2)<REF(P2,1) AND P2<REF(P2,1);
 P5:=COUNT(P3,7)>0 AND P4;
 P6:=3*SMA((CLOSE-LLV(LOW,89))/(HHV(HIGH,89)-LLV(LOW,89))*100,5,1)-2*SMA((CLOSE-LLV(LOW,89))/(HHV(HIGH,89)-LLV(LOW,89))
 *100,5,1);
 P7:= (CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34))*100;
 MW:= EMA(P6,5);
 NU:=(CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34))*100;
 NU0:=SMA(NU,3,1);
 NU00:=SMA(NU0,3,1);
 NU1:=EMA(3*NU0-2*NU00,4);
 NU2:=SMA(NU1,5,1);
 NW:=MA(3*SMA(P7,6,1)-2*SMA(SMA(P7,5,1),5,1),2);
 HW:=CROSS(NW,0) AND MW<56;
 DP:=IF(P5 AND COUNT(P5,5)=1,1,0);
 绝底反弹:((HW AND DP) OR ((CROSS(IF(P6<3 AND NU2<5 AND NW<4,1,0),0.5)) AND LLV(L,34)/HHV(H,144)<0.78))*40;

 

=====================
 

金叉选股
 五:=MA(CLOSE,5);
 年1:=MA(CLOSE,240);
 条件12:=五<年1;
 金叉选股:(CROSS("MACD.DIF#MONTH","MACD.DEA#MONTH") AND 条件12)*40;

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则