通达信公式小周期画框主图
A:=BARSLAST(DATE!=REF(DATE,1))+1;
T:=BARSLAST(CROSS(A=1,0.5));
T1:=REF(A,T+1)+A;
T2:=REF(T1,T+1)+A;
T3:=REF(T2,T+1)+A;
T4:=REF(T3,T+1)+A;
T5:=REF(T4,T+1)+A;
T6:=REF(T5,T+1)+A;
T7:=REF(T6,T+1)+A;
T8:=REF(T7,T+1)+A;
T9:=REF(T8,T+1)+A;
H1:=FINDHIGH(H,0,A,1);
H2:=FINDHIGH(H,A,REF(A,T+1),1);
H3:=FINDHIGH(H,T1,REF(A,T+1),1);
H4:=FINDHIGH(H,T2,REF(A,T+1),1);
H5:=FINDHIGH(H,T3,REF(A,T+1),1);
H6:=FINDHIGH(H,T4,REF(A,T+1),1);
H7:=FINDHIGH(H,T5,REF(A,T+1),1);
H8:=FINDHIGH(H,T6,REF(A,T+1),1);
H9:=FINDHIGH(H,T7,REF(A,T+1),1);
H10:=FINDHIGH(H,T8,REF(A,T+1),1);
L1:=FINDLOW(L,0,A,1);
L2:=FINDLOW(L,A,REF(A,T+1),1);
L3:=FINDLOW(L,T1,REF(A,T+1),1);
L4:=FINDLOW(L,T2,REF(A,T+1),1);
L5:=FINDLOW(L,T3,REF(A,T+1),1);
L6:=FINDLOW(L,T4,REF(A,T+1),1);
L7:=FINDLOW(L,T5,REF(A,T+1),1);
L8:=FINDLOW(L,T6,REF(A,T+1),1);
L9:=FINDLOW(L,T7,REF(A,T+1),1);
L10:=FINDLOW(L,T8,REF(A,T+1),1);
STICKLINE(RANGE(CURRBARSCOUNT,1,CONST(A)),CONST(H1),CONST(H1),8,0),COLORYELLOW;
STICKLINE(RANGE(CURRBARSCOUNT,1,CONST(A)),CONST(L1),CONST(L1),8,0),COLORYELLOW;
STICKLINE(CURRBARSCOUNT=1 OR CURRBARSCOUNT=CONST(A),CONST(L1),CONST(H1),0,0),COLORYELLOW;
STICKLINE(RANGE(CURRBARSCOUNT,CONST(A)+1,CONST(T1)),CONST(H2),CONST(H2),8,0),COLORYELLOW;
STICKLINE(RANGE(CURRBARSCOUNT,CONST(A)+1,CONST(T1)),CONST(L2),CONST(L2),8,0),COLORYELLOW;
STICKLINE(CURRBARSCOUNT=CONST(T1) OR CURRBARSCOUNT=CONST(A)+1,CONST(L2),CONST(H2),0,0),COLORYELLOW;
STICKLINE(RANGE(CURRBARSCOUNT,CONST(T1)+1,CONST(T2)),CONST(H3),CONST(H3),8,0),COLORYELLOW;
STICKLINE(RANGE(CURRBARSCOUNT,CONST(T1)+1,CONST(T2)),CONST(L3),CONST(L3),8,0),COLORYELLOW;
STICKLINE(CURRBARSCOUNT=CONST(T2) OR CURRBARSCOUNT=CONST(T1)+1,CONST(L3),CONST(H3),0,0),COLORYELLOW;
STICKLINE(RANGE(CURRBARSCOUNT,CONST(T2)+1,CONST(T3)),CONST(H4),CONST(H4),8,0),COLORYELLOW;
STICKLINE(RANGE(CURRBARSCOUNT,CONST(T2)+1,CONST(T3)),CONST(L4),CONST(L4),8,0),COLORYELLOW;
STICKLINE(CURRBARSCOUNT=CONST(T3) OR CURRBARSCOUNT=CONST(T2)+1,CONST(L4),CONST(H4),0,0),COLORYELLOW;
STICKLINE(RANGE(CURRBARSCOUNT,CONST(T3)+1,CONST(T4)),CONST(H5),CONST(H5),8,0),COLORYELLOW;
STICKLINE(RANGE(CURRBARSCOUNT,CONST(T3)+1,CONST(T4)),CONST(L5),CONST(L5),8,0),COLORYELLOW;
STICKLINE(CURRBARSCOUNT=CONST(T4) OR CURRBARSCOUNT=CONST(T3)+1,CONST(L5),CONST(H5),0,0),COLORYELLOW;
STICKLINE(RANGE(CURRBARSCOUNT,CONST(T4)+1,CONST(T5)),CONST(H6),CONST(H6),8,0),COLORYELLOW;
STICKLINE(RANGE(CURRBARSCOUNT,CONST(T4)+1,CONST(T5)),CONST(L6),CONST(L6),8,0),COLORYELLOW;
STICKLINE(CURRBARSCOUNT=CONST(T5) OR CURRBARSCOUNT=CONST(T4)+1,CONST(L6),CONST(H6),0,0),COLORYELLOW;
STICKLINE(RANGE(CURRBARSCOUNT,CONST(T5)+1,CONST(T6)),CONST(H7),CONST(H7),8,0),COLORYELLOW;
STICKLINE(RANGE(CURRBARSCOUNT,CONST(T5)+1,CONST(T6)),CONST(L7),CONST(L7),8,0),COLORYELLOW;
STICKLINE(CURRBARSCOUNT=CONST(T6) OR CURRBARSCOUNT=CONST(T5)+1,CONST(L7),CONST(H7),0,0),COLORYELLOW;
STICKLINE(RANGE(CURRBARSCOUNT,CONST(T6)+1,CONST(T7)),CONST(H8),CONST(H8),8,0),COLORYELLOW;
STICKLINE(RANGE(CURRBARSCOUNT,CONST(T6)+1,CONST(T7)),CONST(L8),CONST(L8),8,0),COLORYELLOW;
STICKLINE(CURRBARSCOUNT=CONST(T7) OR CURRBARSCOUNT=CONST(T6)+1,CONST(L8),CONST(H8),0,0),COLORYELLOW;
STICKLINE(RANGE(CURRBARSCOUNT,CONST(T7)+1,CONST(T8)),CONST(H9),CONST(H9),8,0),COLORYELLOW;
STICKLINE(RANGE(CURRBARSCOUNT,CONST(T7)+1,CONST(T8)),CONST(L9),CONST(L9),8,0),COLORYELLOW;
STICKLINE(CURRBARSCOUNT=CONST(T8) OR CURRBARSCOUNT=CONST(T7)+1,CONST(L9),CONST(H9),0,0),COLORYELLOW;
STICKLINE(RANGE(CURRBARSCOUNT,CONST(T8)+1,CONST(T9)),CONST(H10),CONST(H10),8,0),COLORYELLOW;
STICKLINE(RANGE(CURRBARSCOUNT,CONST(T8)+1,CONST(T9)),CONST(L10),CONST(L10),8,0),COLORYELLOW;
STICKLINE(CURRBARSCOUNT=CONST(T9) OR CURRBARSCOUNT=CONST(T8)+1,CONST(L10),CONST(H10),0,0),COLORYELLOW;
未来函数检测结果如下:
该公式包含未来函数:DHIGH
该公式包含未来函数:DLOW
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
A赋值:上次DATE!=1日前的DATE距今天数+1
T赋值:上次A=1上穿0.5距今天数
T1:=T+1日前的A+A
T2:=T+1日前的T1+A
T3:=T+1日前的T2+A
T4:=T+1日前的T3+A
T5:=T+1日前的T4+A
T6:=T+1日前的T5+A
T7:=T+1日前的T6+A
T8:=T+1日前的T7+A
T9:=T+1日前的T8+A
H1赋值:FIND最高价(H,0,A,1)
H2赋值:FIND最高价(H,A,T+1日前的A,1)
H3赋值:FIND最高价(H,T1,T+1日前的A,1)
H4赋值:FIND最高价(H,T2,T+1日前的A,1)
H5赋值:FIND最高价(H,T3,T+1日前的A,1)
H6赋值:FIND最高价(H,T4,T+1日前的A,1)
H7赋值:FIND最高价(H,T5,T+1日前的A,1)
H8赋值:FIND最高价(H,T6,T+1日前的A,1)
H9赋值:FIND最高价(H,T7,T+1日前的A,1)
H10:=FIND最高价(H,T8,T+1日前的A,1)
L1赋值:FIND最低价(L,0,A,1)
L2赋值:FIND最低价(L,A,T+1日前的A,1)
L3赋值:FIND最低价(L,T1,T+1日前的A,1)
L4赋值:FIND最低价(L,T2,T+1日前的A,1)
L5赋值:FIND最低价(L,T3,T+1日前的A,1)
L6赋值:FIND最低价(L,T4,T+1日前的A,1)
L7赋值:FIND最低价(L,T5,T+1日前的A,1)
L8赋值:FIND最低价(L,T6,T+1日前的A,1)
L9赋值:FIND最低价(L,T7,T+1日前的A,1)
L10:=FIND最低价(L,T8,T+1日前的A,1)
STICKLINE(RANGE(CURRBARSCOUNT,1,CONST(A)),CONST(H1),CONST(H1),8,0),画黄色
STICKLINE(RANGE(CURRBARSCOUNT,1,CONST(A)),CONST(L1),CONST(L1),8,0),画黄色
STICKLINE(CURRBARSCOUNT=1 OR CURRBARSCOUNT=CONST(A),CONST(L1),CONST(H1),0,0),画黄色
STICKLINE(RANGE(CURRBARSCOUNT,CONST(A)+1,CONST(T1)),CONST(H2),CONST(H2),8,0),画黄色
STICKLINE(RANGE(CURRBARSCOUNT,CONST(A)+1,CONST(T1)),CONST(L2),CONST(L2),8,0),画黄色
STICKLINE(CURRBARSCOUNT=CONST(T1) OR CURRBARSCOUNT=CONST(A)+1,CONST(L2),CONST(H2),0,0),画黄色
STICKLINE(RANGE(CURRBARSCOUNT,CONST(T1)+1,CONST(T2)),CONST(H3),CONST(H3),8,0),画黄色
STICKLINE(RANGE(CURRBARSCOUNT,CONST(T1)+1,CONST(T2)),CONST(L3),CONST(L3),8,0),画黄色
STICKLINE(CURRBARSCOUNT=CONST(T2) OR CURRBARSCOUNT=CONST(T1)+1,CONST(L3),CONST(H3),0,0),画黄色
STICKLINE(RANGE(CURRBARSCOUNT,CONST(T2)+1,CONST(T3)),CONST(H4),CONST(H4),8,0),画黄色
STICKLINE(RANGE(CURRBARSCOUNT,CONST(T2)+1,CONST(T3)),CONST(L4),CONST(L4),8,0),画黄色
STICKLINE(CURRBARSCOUNT=CONST(T3) OR CURRBARSCOUNT=CONST(T2)+1,CONST(L4),CONST(H4),0,0),画黄色
STICKLINE(RANGE(CURRBARSCOUNT,CONST(T3)+1,CONST(T4)),CONST(H5),CONST(H5),8,0),画黄色
STICKLINE(RANGE(CURRBARSCOUNT,CONST(T3)+1,CONST(T4)),CONST(L5),CONST(L5),8,0),画黄色
STICKLINE(CURRBARSCOUNT=CONST(T4) OR CURRBARSCOUNT=CONST(T3)+1,CONST(L5),CONST(H5),0,0),画黄色
STICKLINE(RANGE(CURRBARSCOUNT,CONST(T4)+1,CONST(T5)),CONST(H6),CONST(H6),8,0),画黄色
STICKLINE(RANGE(CURRBARSCOUNT,CONST(T4)+1,CONST(T5)),CONST(L6),CONST(L6),8,0),画黄色
STICKLINE(CURRBARSCOUNT=CONST(T5) OR CURRBARSCOUNT=CONST(T4)+1,CONST(L6),CONST(H6),0,0),画黄色
STICKLINE(RANGE(CURRBARSCOUNT,CONST(T5)+1,CONST(T6)),CONST(H7),CONST(H7),8,0),画黄色
STICKLINE(RANGE(CURRBARSCOUNT,CONST(T5)+1,CONST(T6)),CONST(L7),CONST(L7),8,0),画黄色
STICKLINE(CURRBARSCOUNT=CONST(T6) OR CURRBARSCOUNT=CONST(T5)+1,CONST(L7),CONST(H7),0,0),画黄色
STICKLINE(RANGE(CURRBARSCOUNT,CONST(T6)+1,CONST(T7)),CONST(H8),CONST(H8),8,0),画黄色
STICKLINE(RANGE(CURRBARSCOUNT,CONST(T6)+1,CONST(T7)),CONST(L8),CONST(L8),8,0),画黄色
STICKLINE(CURRBARSCOUNT=CONST(T7) OR CURRBARSCOUNT=CONST(T6)+1,CONST(L8),CONST(H8),0,0),画黄色
STICKLINE(RANGE(CURRBARSCOUNT,CONST(T7)+1,CONST(T8)),CONST(H9),CONST(H9),8,0),画黄色
STICKLINE(RANGE(CURRBARSCOUNT,CONST(T7)+1,CONST(T8)),CONST(L9),CONST(L9),8,0),画黄色
STICKLINE(CURRBARSCOUNT=CONST(T8) OR CURRBARSCOUNT=CONST(T7)+1,CONST(L9),CONST(H9),0,0),画黄色
STICKLINE(RANGE(CURRBARSCOUNT,CONST(T8)+1,CONST(T9)),CONST(H10),CONST(H10),8,0),画黄色
STICKLINE(RANGE(CURRBARSCOUNT,CONST(T8)+1,CONST(T9)),CONST(L10),CONST(L10),8,0),画黄色
STICKLINE(CURRBARSCOUNT=CONST(T9) OR CURRBARSCOUNT=CONST(T8)+1,CONST(L10),CONST(H10),0,0),画黄色