公式如下:
DT1:(SUM(EMA((CLOSE+LOW)/2,1)/3,3)),COLOR00FFFF,LINETHICK1;DT2:EMA(DT1,3),COLORFF00FF,LINETHICK1;DT3:EMA(DT2,3),COLOR00FF00,LINETHICK1;MTD:=MA(CLOSE,20);DRAWTEXT((CLOSEMTD),MTD,'*'),COLOR0000FF,LINETHICK5;CAT1:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2);CAT2:=REF(CAT1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);CAT3:=REF(CAT2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);CAT4:=REF(CAT3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);CAT5:=REF(CAT4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);CAT6:=REF(CAT5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);CAT7:=REF(CAT6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);CAT8:=REF(CAT7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);CAT9:=REF(CAT8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);CATA:=REF(CAT9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);CATB:=REF(CATA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);CATC:=REF(CATB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);CATD:=CLOSE[O,0.01,0.98,0,'微信公众号:彩虹桥投资学习'),COLORRED;VARE:=REF(CATD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);VARF:=REF(VARE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);CAT10:=REF(VARF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);CAT11:=REF(CAT10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);CAT12:=REF(CAT11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);CAT13:=REF(CAT12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);CAT14:=REF(CAT13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);CAT15:=REF(CAT14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);CAT16:=REF(CAT15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);CAT17:=REF(CAT16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);CAT18:=REF(CAT17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);CAT19:=REF(CATD OR VARE OR VARF OR CAT10 OR CAT11 OR CAT12 OR CAT13 ORCAT14 OR CAT15 OR CAT16 OR CAT17 OR CAT18,1) AND CAT1;CAT1A:=REF(CAT1 OR CAT2 OR CAT3 OR CAT4 OR CAT5 OR CAT6 OR CAT7 ORCAT8 OR CAT9 OR CATA OR CATB OR CATC,1) AND CATD;STICKLINE(CAT1A,REF(CLOSE,1),REF(CLOSE,2),3.2,0),COLORFF3300;STICKLINE(CAT1A,REF(CLOSE,1),REF(CLOSE,2),2.7,0),COLORFF5500;STICKLINE(CAT1A,REF(CLOSE,1),REF(CLOSE,2),2.1,0),COLORFF7700;STICKLINE(CAT1A,REF(CLOSE,1),REF(CLOSE,2),1.5,0),COLORFF9900;STICKLINE(CAT1A,REF(CLOSE,1),REF(CLOSE,2),0.9,0),COLORFFBB00;STICKLINE(CAT1A,REF(CLOSE,1),REF(CLOSE,2),0.3,0),COLORFFDD00;DRAWTEXT(FILTER(CAT19=1,5),LOW,' 买进'),COLORFF00FF;DRAWICON(FILTER(CAT19=1,5),LOW,9);DRAWTEXT(FILTER(CAT1A=1,5),HIGH,' 逃顶'),COLOR00FF00;DRAWICON(FILTER(CAT1A=1,5),HIGH,15);]
信号明显,就做一个“主图买入加副图主力异动”组合信号的选股吧。
选股公式如下 :
VARD:=CLOSE[=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);VARF:=REF(VARE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);VAR1:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2);VAR10:=REF(VARF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);VAR11:=REF(VAR10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);VAR12:=REF(VAR11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);VAR13:=REF(VAR12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);VAR14:=REF(VAR13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);VAR15:=REF(VAR14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);VAR16:=REF(VAR15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);VAR17:=REF(VAR16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);VAR18:=REF(VAR17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);VAR19:=REF(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 ORVAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,1) AND VAR1;VA1:=100-3*SMA((CLOSE-LLV(LOW,65))/(HHV(HIGH,80)-LLV(LOW,65))*100,20,1)+2*SMA(SMA((CLOSE-LLV(LOW,65))/(HHV(HIGH,80)-LLV(LOW,65))*100,20,1),15,1);VA2:=100-3*SMA((OPEN-LLV(LOW,65))/(HHV(HIGH,80)-LLV(LOW,65))*100,20,1)+2*SMA(SMA((OPEN-LLV(LOW,65))/(HHV(HIGH,80)-LLV(LOW,65))*100,20,1),15,1);VA3:=VA1][REF(VOL,1) AND CLOSE>REF(CLOSE,1);A:=WINNER(CLOSE+CLOSE*15/100)*100;B:=WINNER(CLOSE+CLOSE*0/100)*100;CC:=A-B;D:=(WINNER(CLOSE-CLOSE*0.1/100)-WINNER(CLOSE-CLOSE*15/100))*100;E:=CC<3 AND D<0.5 AND OPEN!=LOW;A1:=DYNAINFO(6);A2:=IF(LOW>A1,0,IF(HIGH0 OR A2=1;A8:=A7 AND A3/REF(A3,3)>=3 AND A6<80;A9:=REF(A8,1) OR REF(A8,2) OR REF(A8,3) OR REF(A8,4);A10:=A8 AND A9;A11:=IF(FILTER(A8,3),5,0);A12:=IF(FILTER(A10,3) OR E,10,0);XH:VA3 AND COUNT(VA3,30)=1,15 AND (COUNT(VA3,30)=1)*28 AND A11>0 AND A12>0 AND FILTER(VAR19=1,5);]
测试一下,平仓规则是,不论盈亏,以持股20天后平仓为条件,胜率78.72%
风险提示:本指标公式仅作为知识分享,模拟测试不构成任何投资建议,不作投资依据。
END
|