布林线上升下降分时主图公式[通达信公式]
{布林线分时}
原理解析:
收盘价,画白色
输出BOLL:收盘价的20日简单移动平均,画红色
输出UB:BOLL+2*收盘价的20日估算标准差,画绿色,DOTLINE
输出LB:BOLL-2*收盘价的20日估算标准差,画绿色,DOTLINE
输出上升:如果BOLL>1日前的BOLL,返回BOLL,否则返回无效数,画红色
输出下降:如果BOLL<1日前的BOLL,返回BOLL,否则返回无效数,画蓝色
K赋值:如果小时>12,返回(小时-13)*60+分钟+120,否则返回(小时-9)*60+分钟-30,NODRAW
输出JJ:收盘价*成交量(手)的K日累和/成交量(手)的K日累和,画黄色
源码:
C,COLORWHITE;
BOLL:MA(CLOSE,20),COLORRED;
UB:BOLL+2*STD(CLOSE,20),COLORGREEN,DOTLINE;
LB:BOLL-2*STD(CLOSE,20),COLORGREEN,DOTLINE;
上升:IF(BOLL>REF(BOLL,1),BOLL,DRAWNULL),COLORRED;
下降:IF(BOLL<REF(BOLL,1),BOLL,DRAWNULL),COLORBLUE;
K:=IF(HOUR>12,(HOUR-13)*60+MINUTE+120,(HOUR-9)*60+MINUTE-30),NODRAW;
JJ:SUM(C*V,K)/SUM(V,K),COLORYELLOW;
DRAWTEXT_FIX(C>O,0.01,0.9,0,' WWW.CXH99.COM '),COLORRED;
DRAWTEXT_FIX(C>O,1,1,0,'程序化交易模型'),COLORRED;
赞 (0)