通达信【逍遥分时】分时T+0主图神器 绝无未来 源码附图
{主图分时指标源码}
N:=0;M:=1;
J1:CLOSE,COLORWHITE;
J2:ZSTJJ,COLORYELLOW;
GPZBGS1:=SUM(CLOSE*VOL,240)/SUM(VOL,240);
GPZBGS2:=SUM(CLOSE*VOL,0)/SUM(VOL,0);
GPZBGS3:=SUM(CLOSE*VOL,240)/SUM(VOL,240);
GPZBGS4:=CLOSE>REF(CLOSE,1) AND CLOSE/J2>1+N/1000;
GPZBGS5:=CLOSE<REF(CLOSE,1) AND CLOSE/J2<1-N/1000;
GPZBGS6:=CROSS(SUM(GPZBGS4,0),0.5);
GPZBGS7:=CROSS(SUM(GPZBGS5,0),0.5);
GPZBGS8:=SUM(GPZBGS6,0)*CROSS(COUNT(CLOSE<REF(CLOSE,1),BARSLAST(GPZBGS6)),0.5);
GPZBGS9:=SUM(GPZBGS7,0)*CROSS(COUNT(CLOSE>REF(CLOSE,1),BARSLAST(GPZBGS7)),0.5);
F1:CONST(SUM(IF(GPZBGS8,REF(CLOSE,1),DRAWNULL),0)),DOTLINE,COLORWHITE;
F2:CONST(SUM(IF(GPZBGS9,REF(CLOSE,1),DRAWNULL),0)),DOTLINE,COLORGREEN;
GPZBGS10:=CROSS(SUM(GPZBGS4 AND CLOSE>F1*(1+M/100),0),0.5);
GPZBGS11:=CROSS(SUM(GPZBGS5 AND CLOSE<F2*(1-M/100),0),0.5);
GPZBGS12:=SUM(GPZBGS10,0)*CROSS(COUNT(CLOSE<REF(CLOSE,1),BARSLAST(GPZBGS10)),0.5);
GPZBGS13:=SUM(GPZBGS11,0)*CROSS(COUNT(CLOSE>REF(CLOSE,1),BARSLAST(GPZBGS11)),0.5);
F3:CONST(SUM(IF(GPZBGS12,REF(CLOSE,1),DRAWNULL),0)),COLORWHITE;
F4:CONST(SUM(IF(GPZBGS13,REF(CLOSE,1),DRAWNULL),0)),COLORGREEN;
DRAWICON(GPZBGS8,REF(CLOSE*1.002,1),2);
DRAWICON(GPZBGS12,REF(CLOSE*1.002,1),35);
DRAWICON(GPZBGS9,REF(CLOSE*0.998,1),1);
DRAWICON(GPZBGS13,REF(CLOSE*0.998,1),34);
GPZBGS14:=CLOSE>REF(CLOSE,1) AND CLOSE/J2>1+5/100;
GPZBGS15:=CLOSE<REF(CLOSE,1) AND CLOSE/J2<1-5/100;
GPZBGS16:=CROSS(SUM(GPZBGS14,0),0.5);
GPZBGS17:=CROSS(SUM(GPZBGS15,0),0.5);
GPZBGS18:=SUM(GPZBGS16,0)*CROSS(COUNT(CLOSE<REF(CLOSE,1),BARSLAST(GPZBGS16)),0.5);
GPZBGS19:=SUM(GPZBGS17,0)*CROSS(COUNT(CLOSE>REF(CLOSE,1),BARSLAST(GPZBGS17)),0.5);
GPZBGS20:=CONST(SUM(IF(GPZBGS18,REF(CLOSE,1),DRAWNULL),0));
GPZBGS21:=CONST(SUM(IF(GPZBGS19,REF(CLOSE,1),DRAWNULL),0));
DRAWICON(GPZBGS18,REF(CLOSE*1.002,1),15);
DRAWICON(GPZBGS19,REF(CLOSE*0.998,1),9);
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
{主图分时指标源码}
N赋值:0
M赋值:1
输出J1:收盘价,画白色
输出J2:ZSTJJ,画黄色
GPZBGS1赋值:240的收盘价*成交量日累和/240的成交量日累和
GPZBGS2赋值:0的收盘价*成交量日累和/0的成交量日累和
GPZBGS3赋值:240的收盘价*成交量日累和/240的成交量日累和
GPZBGS4赋值:收盘价>1日前的收盘价 AND 收盘价/J2>1+N/1000
GPZBGS5赋值:收盘价<1日前的收盘价 AND 收盘价/J2<1-N/1000
GPZBGS6赋值:CROSS(0的GPZBGS4日累和,0.5)
GPZBGS7赋值:CROSS(0的GPZBGS5日累和,0.5)
GPZBGS8赋值:0的GPZBGS6日累和*CROSS(COUNT(收盘价<1日前的收盘价,上次GPZBGS6距今天数),0.5)
GPZBGS9赋值:0的GPZBGS7日累和*CROSS(COUNT(收盘价>1日前的收盘价,上次GPZBGS7距今天数),0.5)
输出F1:CONST(SUM(IF(GPZBGS8,1日前的收盘价,DRAWNULL),0)),DOTLINE,画白色
输出F2:CONST(SUM(IF(GPZBGS9,1日前的收盘价,DRAWNULL),0)),DOTLINE,画绿色
GPZBGS10:=CROSS(SUM(GPZBGS4 AND 收盘价>F1*(1+M/100),0),0.5)
GPZBGS11:=CROSS(SUM(GPZBGS5 AND 收盘价
GPZBGS12:=0的GPZBGS10日累和*CROSS(COUNT(收盘价<1日前的收盘价,上次GPZBGS10距今天数),0.5)
GPZBGS13:=0的GPZBGS11日累和*CROSS(COUNT(收盘价>1日前的收盘价,上次GPZBGS11距今天数),0.5)
输出F3:CONST(SUM(IF(GPZBGS12,1日前的收盘价,DRAWNULL),0)),画白色
输出F4:CONST(SUM(IF(GPZBGS13,1日前的收盘价,DRAWNULL),0)),画绿色
DRAWICON(GPZBGS8,1日前的收盘价*1.002,2)
DRAWICON(GPZBGS12,1日前的收盘价*1.002,35)
DRAWICON(GPZBGS9,1日前的收盘价*0.998,1)
DRAWICON(GPZBGS13,1日前的收盘价*0.998,34)
GPZBGS14:=收盘价>1日前的收盘价 AND 收盘价/J2>1+5/100
GPZBGS15:=收盘价<1日前的收盘价 AND 收盘价/J2<1-5/100
GPZBGS16:=CROSS(0的GPZBGS14日累和,0.5)
GPZBGS17:=CROSS(0的GPZBGS15日累和,0.5)
GPZBGS18:=0的GPZBGS16日累和*CROSS(COUNT(收盘价<1日前的收盘价,上次GPZBGS16距今天数),0.5)
GPZBGS19:=0的GPZBGS17日累和*CROSS(COUNT(收盘价>1日前的收盘价,上次GPZBGS17距今天数),0.5)
GPZBGS20:=CONST(SUM(IF(GPZBGS18,1日前的收盘价,DRAWNULL),0))
GPZBGS21:=CONST(SUM(IF(GPZBGS19,1日前的收盘价,DRAWNULL),0))
DRAWICON(GPZBGS18,1日前的收盘价*1.002,15)
DRAWICON(GPZBGS19,1日前的收盘价*0.998,9)