通达信强势主力 源码
HJ_1:=IF(HHV(ABS(HHV(CLOSE,6)/LLV(CLOSE,6)-1),6)>10/100,3,6);
HJ_2:=IF(MINUTE=5,HJ_1*48,IF(MINUTE=15,HJ_1*16,IF(MINUTE=30,HJ_1*8,IF(MINUTE=60,HJ_1*4,HJ_1))));
HJ_3:=IF(VOL=0,MA(CLOSE,HJ_2),SUM(AMOUNT,HJ_2)/SUM(VOL,HJ_2)/100);
HJ_4:=MA(CLOSE,5)>REF(MA(CLOSE,5),1) AND REF(CLOSE>OPEN OR CLOSE<OPEN,69) AND HIGH/CLOSE<1.02 AND REF(CLOSE>OPEN OR CLOSE<OPEN,158);
HJ_5:=REF(MA(CLOSE,5)<REF(MA(CLOSE,5),1),1) AND REF(CLOSE>OPEN OR CLOSE<OPEN,164) AND REF(CLOSE>OPEN OR CLOSE<OPEN,14);
HJ_6:=CLOSE>OPEN AND REF(CLOSE>OPEN,1) AND REF(CLOSE<OPEN,2) AND REF(OPEN/CLOSE>1.02,2) AND REF(OPEN/CLOSE<1.08,46);
HJ_7:=IF(CROSS(CLOSE,REF(HJ_3,1)),REF(HJ_3,1),0);
HJ_8:=HHV(HJ_7>0,BARSLAST(IF(CROSS(REF(HJ_3,1),CLOSE),REF(HJ_3,1),0)>0)+1);
HJ_9:=HJ_8>REF(HJ_8,1) AND CROSS(EMA(CLOSE,3),EMA(CLOSE,21));
强势主力:HJ_4 AND HJ_5 AND HJ_6 AND HJ_9;
{-----------------------------------}
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
HJ_1赋值:IF(HHV(HHV(收盘价,6的绝对值/6日内收盘价最低值-1),6)>10/100,3,6)
HJ_2赋值:IF(MINUTE=5,HJ_1*48,IF(MINUTE=15,HJ_1*16,IF(MINUTE=30,HJ_1*8,IF(MINUTE=60,HJ_1*4,HJ_1))))
HJ_3赋值:IF(成交量=0,收盘价的HJ_2日简单移动平均,HJ_2的成交额日累和/HJ_2的成交量日累和/100)
HJ_4赋值:收盘价的5日简单移动平均>REF(收盘价的5日简单移动平均,1) AND REF(收盘价>开盘价 OR 收盘价<开盘价,69) AND 最高价/收盘价<1.02 AND REF(收盘价>开盘价 OR 收盘价<开盘价,158)
HJ_5赋值:REF(收盘价的5日简单移动平均[开盘价 OR 收盘价<开盘价,164) AND REF(收盘价>开盘价 OR 收盘价<开盘价,14)]
HJ_6赋值:收盘价>开盘价 AND 1日前的收盘价>开盘价 AND 2日前的收盘价<开盘价 AND 2日前的开盘价/收盘价>1.02 AND 46日前的开盘价/收盘价<1.08
HJ_7赋值:IF(CROSS(收盘价,1日前的HJ_3),1日前的HJ_3,0)
HJ_8赋值:HHV(HJ_7>0,上次IF(CROSS(1日前的HJ_3,收盘价距今天数,1日前的HJ_3,0)>0)+1)
HJ_9赋值:HJ_8>1日前的HJ_8 AND CROSS(收盘价的3日指数移动平均,收盘价的21日指数移动平均)
输出
强势主力:HJ_4 AND HJ_5 AND HJ_6 AND HJ_9
{-----------------------------------}