通达信全仓买入幅图指标源码
LSL:=(CLOSE-LLV(LOW,28))/(HHV(HIGH,30)-LLV(LOW,36))*0.6*CLOSE;LSLA:=SMA(LSL,6.3,1);BFBG:SMA(LSLA,3,1),COLORFF00FF;LSLB:=3*LSLA-2.1*BFBG;KF:=3*BFBG-1* LSLA;ZK:IF(KF>LSLB,LSLB,KF),LINETHICK2,COLOR00FF00;ZKZQ:HHV(ZK,21),COLORBLUE,LINETHICK2;DT:IF(ZK>=REF(ZK,1) ,ZK,DRAWNULL),COLORRED,LINETHICK3;DRAWICON(ZK>=REF(ZK,1) AND REF(ZK,1)<REF(ZK,2),ZK,9);KT:IF(ZK<REF(ZK,1),ZK,DRAWNULL),COLORGREEN,LINETHICK3;DX:(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*20,LINETHICK0,COLORWHITE;ZX:(CLOSE-MA(CLOSE,4))/MA(CLOSE,4)*20,LINETHICK0,COLORYELLOW;HZ:SMA(DX,3,1),LINETHICK0,COLOR0000FF;LZ:SMA(ZX,3,1),COLORSTICK,COLORFFFF00;STICKLINE(HZ<REF(HZ,1)AND HZ>0,0,HZ,2,0),COLOR888800;STICKLINE(HZ<REF(HZ,1)AND HZ>0,0,HZ,1.5,0),COLORAAAA00;STICKLINE(HZ<REF(HZ,1)AND HZ>0,0,HZ,0.8,0),COLORDDDD00;STICKLINE(HZ<REF(HZ,1)AND HZ>0,0,HZ,0.3,0),COLORFFFF00;STICKLINE(HZ>REF(HZ,1)AND HZ>0,0,HZ,2,0),COLOR000088;STICKLINE(HZ>REF(HZ,1)AND HZ>0,0,HZ,1.5,0),COLOR0000AA;STICKLINE(HZ>REF(HZ,1)AND HZ>0,0,HZ,0.8,0),COLOR0000DD;STICKLINE(HZ>REF(HZ,1)AND HZ>0,0,HZ,0.3,0),COLOR0000FF;STICKLINE(LZ<REF(LZ,1) AND LZ>0,0,LZ,2,0),COLOR008800;STICKLINE(LZ<REF(LZ,1) AND LZ>0,0,LZ,1,0),COLOR00AA00;STICKLINE(LZ<REF(LZ,1) AND LZ>0,0,LZ,0.8,0),COLOR00DD00;STICKLINE(LZ<REF(LZ,1) AND LZ>0,0,LZ,0.3,0),COLOR00FF00;STICKLINE(HZ>REF(HZ,1)AND HZ<0,0,HZ,2,0),COLOR880088;STICKLINE(HZ>REF(HZ,1)AND HZ<0,0,HZ,1.5,0),COLORAA00AA;STICKLINE(HZ>REF(HZ,1)AND HZ<0,0,HZ,0.8,0),COLORDD00DD;STICKLINE(HZ>REF(HZ,1)AND HZ<0,0,HZ,0.3,0),COLORFF00FF;STICKLINE(HZ<REF(HZ,1)AND HZ<0,0,HZ,2,0),COLOR888800;STICKLINE(HZ<REF(HZ,1)AND HZ<0,0,HZ,1.5,0),COLORAAAA00;STICKLINE(HZ<REF(HZ,1)AND HZ<0,0,HZ,0.8,0),COLORDDDD00;STICKLINE(HZ<REF(HZ,1)AND HZ<0,0,HZ,0.3,0),COLORFFFF00;STICKLINE(LZ>REF(LZ,1)AND LZ<0,0,LZ,2,0),COLOR009999;STICKLINE(LZ>REF(LZ,1)AND LZ<0,0,LZ,1.5,0),COLOR00BBBB;STICKLINE(LZ>REF(LZ,1)AND LZ<0,0,LZ,0.8,0),COLOR00DDDD;STICKLINE(LZ>REF(LZ,1)AND LZ<0,0,LZ,0.3,0),COLOR00FFFF; VAR200:=(CLOSE-LLV(LOW,20))/(HHV(HIGH,20)-LLV(LOW,20))*100;VAR300:=SMA(SMA(VAR200,3,1),3,1)/28.57;VAR400:=EMA(VAR300,5);CP:=3*VAR300-2*VAR400;A1:=CROSS(CP,VAR300) AND VAR300<2.1 AND C>O;STICKLINE(A1,5,0,4,0),COLOR770077;STICKLINE(A1,5,0,3,0),COLOR990099;STICKLINE(A1,5,0,2,0),COLORBB00BB;STICKLINE(A1,5,0,1,0),COLORDD00DD;STICKLINE(A1,5,0,0.3,0),COLORFF00FF;DRAWTEXT(A1,4.2,'全仓买入'),COLORRED;
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
LSL赋值:(收盘价-28日内最低价最低值)/(30日内最高价最高值-36日内最低价最低值)*0.6*收盘价
LSL的6.3日[1日权重]移动平均
LSLA的3日[1日权重]移动平均
LSLB:=3*LSLA-2.1*BFBG
KF赋值:3*BFBG-1* LSLA
如果KF>LSLB返回LSLB否则返回KF
ZKZQ:21日内ZK最高值, 画蓝色, 线宽为2
输出DT:IF(ZK>=1日前的ZK ,ZK,DRAWNULL),画红色, 线宽为3
DRAWICON(ZK>=1日前的ZK AND 1日前的ZK<2日前的ZK,ZK,9)
输出KT:IF(ZK<1日前的ZK,ZK,DRAWNULL),画绿色, 线宽为3
输出DX:(收盘价-收盘价的13日简单移动平均)/收盘价的13日简单移动平均*20,LINETHICK0,画白色
输出ZX:(收盘价-收盘价的4日简单移动平均)/收盘价的4日简单移动平均*20,LINETHICK0,画黄色
DX的3日[1日权重]移动平均
ZX的3日[1日权重]移动平均
STICKLINE(HZ<1日前的HZAND HZ>0,0,HZ,2,0),COLOR888800
STICKLINE(HZ<1日前的HZAND HZ>0,0,HZ,1.5,0),COLORAAAA00
STICKLINE(HZ<1日前的HZAND HZ>0,0,HZ,0.8,0),COLORDDDD00
STICKLINE(HZ<1日前的HZAND HZ>0,0,HZ,0.3,0),COLORFFFF00
STICKLINE(HZ>1日前的HZAND HZ>0,0,HZ,2,0),COLOR000088
STICKLINE(HZ>1日前的HZAND HZ>0,0,HZ,1.5,0),COLOR0000AA
STICKLINE(HZ>1日前的HZAND HZ>0,0,HZ,0.8,0),COLOR0000DD
STICKLINE(HZ>1日前的HZAND HZ>0,0,HZ,0.3,0),COLOR0000FF
STICKLINE(LZ<1日前的LZ AND LZ>0,0,LZ,2,0),COLOR008800
STICKLINE(LZ<1日前的LZ AND LZ>0,0,LZ,1,0),COLOR00AA00
STICKLINE(LZ<1日前的LZ AND LZ>0,0,LZ,0.8,0),COLOR00DD00
STICKLINE(LZ<1日前的LZ AND LZ>0,0,LZ,0.3,0),COLOR00FF00
STICKLINE(HZ>1日前的HZAND HZ<0,0,HZ,2,0),COLOR880088
STICKLINE(HZ>1日前的HZAND HZ<0,0,HZ,1.5,0),COLORAA00AA
STICKLINE(HZ>1日前的HZAND HZ<0,0,HZ,0.8,0),COLORDD00DD
STICKLINE(HZ>1日前的HZAND HZ<0,0,HZ,0.3,0),COLORFF00FF
STICKLINE(HZ<1日前的HZAND HZ<0,0,HZ,2,0),COLOR888800
STICKLINE(HZ<1日前的HZAND HZ<0,0,HZ,1.5,0),COLORAAAA00
STICKLINE(HZ<1日前的HZAND HZ<0,0,HZ,0.8,0),COLORDDDD00
STICKLINE(HZ<1日前的HZAND HZ<0,0,HZ,0.3,0),COLORFFFF00
STICKLINE(LZ>1日前的LZAND LZ<0,0,LZ,2,0),COLOR009999
STICKLINE(LZ>1日前的LZAND LZ<0,0,LZ,1.5,0),COLOR00BBBB
STICKLINE(LZ>1日前的LZAND LZ<0,0,LZ,0.8,0),COLOR00DDDD
STICKLINE(LZ>1日前的LZAND LZ<0,0,LZ,0.3,0),COLOR00FFFF
VAR200赋值:(收盘价-20日内最低价最低值)/(20日内最高价最高值-20日内最低价最低值)*100
VAR200的3日[1日权重]移动平均
VAR400赋值:VAR300的5日指数移动平均
CP赋值:3*VAR300-2*VAR400
A1赋值:CP上穿VAR300 AND VAR300<2.1 AND C>O
当满足条件A1时,在5和0之间画柱状线
当满足条件A1时,在5和0之间画柱状线
当满足条件A1时,在5和0之间画柱状线
当满足条件A1时,在5和0之间画柱状线
当满足条件A1时,在5和0之间画柱状线
当满足条件A1时,在4.2和'全仓买入'位置书写文字