条件选股公式:
macd背离的公式选股器
DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA);
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
B1:=REF(C,A1+1)>C ANDREF(DIFF,A1+1)<DIFF AND CROSS(DIFF,DEA);
FILTER(B1>0,5)
条件选股公式:
macd,RSi,kdj底背离
KDJ_K:="KDJ.K"(9,3,3);KDJ_D:="KDJ.D"(9,3,3);KDJ_J:="KDJ.J"(9,3,3);
买1:=CROSS(KDJ_J,0) OR (CROSS(KDJ_J,KDJ_K) ANDKDJ_D<26);
买2:=CROSS("RSI.RSI1"(6,2,2),20) ORCROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24));
买3:=CROSS("MACD.DIF","MACD.DEA") OR CROSS("MACD.MACD",0);
买0:=买1+买2+买3;
买:IF(买0>1,买0,0);
通达信百发百中
{百发百中 K:100,120,105}
VARA:=CLOSE/MA(CLOSE,48)*100<71*K/100;
VARB:=CLOSE/MA(CLOSE,50)*100<70*K/100;
VARC:=HIGH/LOW>1.078/K*100;
VARD:=VARC AND COUNT(VARC,4)>2;
VAR1:=CLOSE;
VAR2:=MA(VAR1,6);
VAR3:=MA(VAR1,24);
VAR4:=MA(VAR1,32);
VAR5:=MA(VAR1,62);
VAR6:=MA(VAR1,105);
百:=VAR5/VAR6*100;发:=VAR4/VAR2*100;中:=VAR3/VAR2*100;
财:=VAR2/VAR1*100;入:=CLOSE/COST(8)*100;
((发>110/K*100 AND 入<80*K/100) OR(VARD AND (VARA OR VARB)))
AND (HIGH>LOW) AND(REF(HIGH,1)>REF(LOW,1)) AND
(REF(HIGH,2)>REF(LOW,2)) AND(REF(HIGH,3)>REF(LOW,3)) AND
(REF(HIGH,4)>REF(LOW,4)) AND(REF(HIGH,5)>REF(LOW,5));
1)KDJ和RSI在20以下钝化一段时间;2)MACD绿线逐渐缩短,且DIF上穿DAE而DEA也向上运行;3)日线向SAR靠拢并交叉;4)ROC在超卖区上穿MROC并且MROC上行;5)BOLL开口放大;6)5日线走平并上穿10日线且10日线走平并向上。
试着将上述条件编成一公式,经测试,结果为零。于是,删除并放宽一些条件,有如下公式:
DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA);
AA1:=DIFF<0 AND DIFF>=DEA ANDDEA>REF(DEA,1)ANDMACD>REF(MACD,1);
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
AA2:=3*K-2*D<25;
LC:= REF(CLOSE,1);
AA3:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100<30;
ROC:=(CLOSE-REF(CLOSE,12))/REF(CLOSE,12)*100;
ROCMA:=MA(ROC,6);
AA4:=ROCMA<0 AND ROC>=ROCMA ANDROCMA>REF(ROCMA,1);
AA5:=C<SAR(10,2,20)OR CROSS(C,SAR(10,2,20));
MID:=MA(CLOSE,26);
UPPER:=MID+2*STD(CLOSE,26);
AA1 AND AA2 AND AA3 AND AA4 AND AA5;
大家可再减少一些条件试试,信号会逐步增多。比如去掉最后两个后,成功率仍是百分之百,而信号由6个增加到10个。
如果觉得《(5)[转载]MACD底背离的通达信选股公式》对你有帮助,请点赞、收藏,并留下你的观点哦!