DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA);
FH1:=REF(macd,1)<REF(MACD,2) AND REF(MACD,2)<REF(MACD,3) AND REF(MACD,3)<REF(MACD,4);
FH2:=MACD>=0 AND COUNT(MACD>REF(MACD,1),1)=1;
FH3:=FH1 AND FH2 AND EMA(C,13)>REF(EMA(C,13),1);
FH4:=FH1 AND FH2 AND ABS((DIFF-DEA)/C)<0.018;
FH5:=FH1 AND FH2 AND MACD<0.10;
LG:=FH3 OR FH4 OR FH5;AA:=WINNER(CLOSE+CLOSE*15/100)*100;
MA5 :=EMA(CLOSE,5);
趋势:=MA5-EMA(MA5,2);
JCSJ1:=BARSLAST(CROSS(趋势,0))+1;
JCSJ2:=JCSJ1+REF(JCSJ1,JCSJ1);
双底:=AA AND IF(JCSJ1=1 AND MA5>REF(MA5,JCSJ2) AND COUNT(趋势<0,4)>=2,1,0);
TT:=AA AND 双底;
TG:LG AND TT AND MA(C,5)<MA(C,10) AND CROSS(C,MA(C,10));
九毛八公式解读
DIFF赋值:收盘价的12日指数移动平均-收盘价的26日指数移动平均 DEA赋值:DIFF的9日指数移动平均 MACD赋值:2*(DIFF-DEA) FH1赋值:1日前的MACD<2日前的MACD AND 2日前的MACD<3日前的MACD AND 3日前的MACD<4日前的MACD FH2赋值:MACD>=0 AND 统计1日中满足MACD>1日前的MACD的天数=1 FH3赋值:FH1 AND FH2 AND 收盘价的13日指数移动平均>1日前的收盘价的13日指数移动平均 FH4赋值:FH1 AND FH2 AND (DIFF-DEA)/收盘价的绝对值<0.018 FH5赋值:FH1 AND FH2 AND MACD<0.10 LG赋值:FH3 OR FH4 OR FH5 AA赋值:以收盘价+收盘价*15/100计算的获利盘比例*100 赋值:收盘价的5日指数移动平均 趋势赋值:MA5-MA5的2日指数移动平均 JCSJ1赋值:上次趋势上穿0距今天数+1 JCSJ2赋值:JCSJ1+JCSJ1日前的JCSJ1 双底赋值:AA AND 如果JCSJ1=1ANDMA5>JCSJ2日前的MA5ANDCOUNT(趋势<0,4)>=2,返回1,否则返回0 TT赋值:AA AND 双底 输出TG:LG AND TT AND 收盘价的5日简单移动平均<收盘价的10日简单移动平均 AND 收盘价上穿收盘价的10日简单移动平均