MA5:=MA(CLOSE,5);
MA5S:=MA(C,5);
MA13S:=MA(C,13);
MA20S:=MA(C,20);
MA30S:=MA(C,30);
MA60S:=MA(C,60);
MA120S:=SMA(C,120,1);
N:=10;
ZH520:=ABS(MA5S-MA20S)/MA20S*100<=N;
ZH530:=ABS(MA5S-MA30S)/MA30S*100<=N;
QSXS1:=MA5>REF(MA5S,1);
QSXS2:=MA20S>REF(MA20S,1);
QSXS3:=MA30S>REF(MA30S,1);
DTPL:=MA20S>MA30S AND MA30S>MA120S;
LYHT:=DTPL AND QSXS2 AND QSXS3 AND NOT(QSXS1) AND REF(QSXS1,1);
LYT:=DTPL AND QSXS2 AND QSXS3 AND COUNT(QSXS1,4)<=1;
GJHS:=C>MA5 AND ((QSXS1 AND NOT(REF(QSXS1,1))) OR C>REF(C,3));
LYKK:=GJHS AND (ZH520 OR ZH530) AND LYT;
DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);
买:(LYKK AND NOT(REF(LYKK,1)))*50;
九毛八公式解读
MA5赋值:收盘价的5日简单移动平均 MA5S赋值:收盘价的5日简单移动平均 MA13S赋值:收盘价的13日简单移动平均 MA20S赋值:收盘价的20日简单移动平均 MA30S赋值:收盘价的30日简单移动平均 MA60S赋值:收盘价的60日简单移动平均 MA120S赋值:收盘价的120日[1日权重]移动平均 N赋值:10 ZH520赋值:MA5S-MA20S的绝对值/MA20S*100<=N ZH530赋值:MA5S-MA30S的绝对值/MA30S*100<=N QSXS1赋值:MA5>1日前的MA5S QSXS2赋值:MA20S>1日前的MA20S QSXS3赋值:MA30S>1日前的MA30S DTPL赋值:MA20S>MA30S AND MA30S>MA120S LYHT赋值:DTPL AND QSXS2 AND QSXS3 AND 取反 AND 1日前的QSXS1 LYT赋值:DTPL AND QSXS2 AND QSXS3 AND 统计4日中满足QSXS1的天数<=1 GJHS赋值:收盘价>MA5 AND ((QSXS1 AND 取反) OR 收盘价>3日前的收盘价) LYKK赋值:GJHS AND (ZH520 OR ZH530) AND LYT DX赋值:100*动量线的6日指数移动平均的6日指数移动平均/动量线的绝对值的6日指数移动平均的6日指数移动平均 输出买:(LYKK AND 取反)*50