通达信KMJ主力密码 源码
HJ_1:=IF(PERIOD=1,5,IF(PERIOD=2,15,IF(PERIOD=3,30,IF(PERIOD=4,60,IF(PERIOD=5,240,1)))));
HJ_2:=MOD(FROMOPEN,HJ_1);
HJ_3:=IF(HJ_2<0.5,HJ_1,HJ_2);
VVOL:IF(CURRBARSCOUNT=1,VOL*HJ_1/HJ_3,DRAWNULL),NODRAW;
STICKLINE(CURRBARSCOUNT=1 AND (SETCODE=0 OR SETCODE=1),VVOL,0,(-1),(-1)),COLOR00C0C0;
主力密码:VOL,VOLSTICK;
HJ_4:=IF(CLOSE>REF(CLOSE,1),VOL,-VOL);
HJ_5:=SUM(IF(CLOSE=REF(CLOSE,1),0,HJ_4),0);
HJ_6:=EMA(HJ_5,3)-MA(HJ_5,9);
HJ_7:=EMA(IF(HJ_6>0,HJ_6,0),3);
HJ_8:=MA(CLOSE,3);
STICKLINE(HJ_7>REF(HJ_7,1) AND HJ_8>REF(HJ_8,1),0,HJ_7,0.3,1),COLORYELLOW;
HJ_9:=REF(CLOSE,1);{}
HJ_10:=SUM(VOL,2)/((HHV(HIGH,2)-LLV(LOW,2))*100);
HJ_11:=(CLOSE-HJ_9)*HJ_10;
HJ_12:=SUM(HJ_11,0);
HJ_13:=FORCAST(HJ_12,18);
HJ_14:=FORCAST(HJ_12,36);
资金强弱:HJ_13-HJ_14;
资金趋势:MA(资金强弱,10),COLORWHITE;
{-----------------------------------}
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
HJ_1赋值:IF(PERIOD=1,5,IF(PERIOD=2,15,IF(PERIOD=3,30,IF(PERIOD=4,60,IF(PERIOD=5,240,1)))))
HJ_2赋值:MOD(FROM开盘价,HJ_1)
如果HJ_2<0.5返回HJ_1否则返回HJ_2
如果 到最后交易的周期=1返回成交量*HJ_1/HJ_3否则返回DRAWNULL
STICKLINE( 到最后交易的周期=1 AND (SETCODE=0 OR SETCODE=1),V成交量,0,(-1),(-1)),COLOR00C0C0
输出
主力密码:成交量,成交量STICK
HJ_4赋值:IF(收盘价>1日前的收盘价,成交量,-成交量)
HJ_5赋值:SUM(IF(收盘价=1日前的收盘价,0,HJ_4),0)
HJ_6赋值:HJ_5的3日指数移动平均-HJ_5的9日简单移动平均
如果HJ_6>0返回HJ_6否则返回0
HJ_8赋值:收盘价的3日简单移动平均
STICKLINE(HJ_7>1日前的HJ_7 AND HJ_8>1日前的HJ_8,0,HJ_7,0.3,1),画黄色
HJ_9赋值:1日前的收盘价
{}
HJ_10:=2的成交量日累和/((2日内最高价最高值-2日内最低价最低值)*100)
HJ_11:=(收盘价-HJ_9)*HJ_10
HJ_12:=0的HJ_11日累和
HJ_13:=FORCAST(HJ_12,18)
HJ_14:=FORCAST(HJ_12,36)
输出
资金强弱:HJ_13-HJ_14
输出
资金趋势:资金强弱的10日简单移动平均,画白色
{-----------------------------------}