未来函数检测结果如下:
该公式包含未来函数:ZIG
该公式包含未来函数:PEAK
该公式包含未来函数:TROUGH
指标源码:
原理解析:
{A1赋值:10
A2赋值:10
A3赋值:ZIG(3,10)
A4赋值:PEAK(3,10,1)
A5赋值:TROUGH(3,10,1)
输出CC:IF((A3 < (1日前的A3)),A4,A5),LINETHICK2
A6赋值:CROSS((A4 - 0.02),A3)
A7赋值:CROSS(A3,(A5 + 0.02))
A8赋值:A2 / 100
A9赋值:IF((A3 < (1日前的A3)),A8,A8的相反数)
A10赋值:IF((A3 < (1日前的A3)),A6,A7)
}
输出J:IF(H>=1日前的H,H,DRAWNULL),NODRAW
DRAWTEXT(J<>1日前的J,J,VAR2STR(J,2))
输出D:IF(L<=1日前的L,L,DRAWNULL),NODRAW
DRAWTEXT(D<>1日前的D,D,VAR2STR(D,2)),COLORYELLOW
M赋值:INTPART(FRACPART(J)*10)
N赋值:INTPART(FRACPART(J*10)*10)
DRAWTEXT(M=N,H,VAR2STR(J,2)),COLORRED
M2:=INTPART(FRACPART(D)*10)
N2:=INTPART(FRACPART(D*10)*10)
DRAWTEXT(M2=N2,L,VAR2STR(D,2)),COLORLIBLUE
输出T:IF(BETWEEN(J,1,9.999),INTPART(J)+M+N,DRAWNULL),NODRAW
输出K:IF(T>=10,INTPART(T/10)+INTPART(FRACPART(T/10)*10),DRAWNULL),NODRAW
如果T<10返回T否则返回DRAWNULL
DRAWTEXT(K>=0,J+0.05,VAR2STR(K,0)),COLORGREEN
DRAWTEXT(W>=1,J+0.05,VAR2STR(W,0)),COLORGREEN,COLORGREEN
T1:IF(BETWEEN(J,10,99.999),INTPART(J/10)+INTPART(FRACPART(J/10)*10)+M+N,DRAWNULL),NODRAW
K1:IF(T1>=10,INTPART(T1/10)+INTPART(FRACPART(T1/10)*10),DRAWNULL),NODRAW
DRAWTEXT(K1>=0,J+0.25,VAR2STR(K1,0)),COLORGREEN
如果T1<10返回T1否则返回DRAWNULL
DRAWTEXT(W1>=1,J+0.05,VAR2STR(W1,0)),COLORGREEN,COLORGREEN
T2:IF(BETWEEN(J,100,999.999),INTPART(J/100)+INTPART(FRACPART(J/100)*10)+INTPART(FRACPART(FRACPART(J/100)*10)*10)+M+N,DRAWNULL),NODRAW
K2:IF(T2>=10,INTPART(T2/10)+INTPART(FRACPART(T2/10)*10),DRAWNULL),NODRAW
DRAWTEXT(K2>=0,J+0.9,VAR2STR(K2,0)),COLORGREEN
如果T2<10返回T2否则返回DRAWNULL
DRAWTEXT(W2>=1,J+0.9,VAR2STR(W2,0)),COLORGREEN,COLORGREEN
T3:IF(BETWEEN(J,1000,9999.999),INTPART(J/1000)+INTPART(FRACPART(J/1000)*10)+INTPART(FRACPART(FRACPART(J/1000)*10)*10)+INTPART(FRACPART(FRACPART(J/1000)*100)*10)+M+N,DRAWNULL),NODRAW
K3:IF(T3>=10,INTPART(T3/10)+INTPART(FRACPART(T3/10)*10),DRAWNULL),NODRAW
DRAWTEXT(K3>=0,J+10,VAR2STR(K3,0)),COLORGREEN
如果T3<10返回T3否则返回DRAWNULL
DRAWTEXT(W3>=1,J+10,VAR2STR(W3,0)),COLORGREEN,COLORGREEN
输出X:IF(BETWEEN(D,1,9.999),INTPART(D)+M2+N2,DRAWNULL),NODRAW
输出Y:IF(X>=10,INTPART(X/10)+INTPART(FRACPART(X/10)*10),DRAWNULL),NODRAW
如果X<10返回X否则返回DRAWNULL
DRAWTEXT(Y>=0,D-0.05,VAR2STR(Y,0)),COLORGREEN,COLORMAGENTA
DRAWTEXT(Q>=1,D-0.05,VAR2STR(Q,0)),COLORGREEN,COLORMAGENTA
X1:IF(BETWEEN(D,10,99.999),INTPART(D/10)+INTPART(FRACPART(D/10)*10)+M2+N2,DRAWNULL),NODRAW
Y1:IF(X1>=10,INTPART(X1/10)+INTPART(FRACPART(X1/10)*10),DRAWNULL),NODRAW
DRAWTEXT(Y1>=0,D-0.25,VAR2STR(Y1,0)),COLORMAGENTA
如果X1<10返回X1否则返回DRAWNULL
DRAWTEXT(Q1>=1,D-0.25,VAR2STR(Q1,0)),COLORGREEN,COLORMAGENTA
X2:IF(BETWEEN(D,100,999.999),INTPART(D/100)+INTPART(FRACPART(D/100)*10)+INTPART(FRACPART(FRACPART(D/100)*10)*10)+M2+N2,DRAWNULL),NODRAW
Y2:IF(X2>=10,INTPART(X2/10)+INTPART(FRACPART(X2/10)*10),DRAWNULL),NODRAW
DRAWTEXT(Y2>=0,D-0.9,VAR2STR(Y2,0)),COLORMAGENTA
如果X2<10返回X2否则返回DRAWNULL
DRAWTEXT(Q2>=1,D-0.9,VAR2STR(Q2,0)),COLORGREEN,COLORMAGENTA
X3:IF(BETWEEN(D,1000,9999.999),INTPART(D/1000)+INTPART(FRACPART(D/1000)*10)+INTPART(FRACPART(FRACPART(D/1000)*10)*10)+INTPART(FRACPART(FRACPART(D/1000)*100)*10)+M2+N2,DRAWNULL),NODRAW
Y3:IF(X3>=10,INTPART(X3/10)+INTPART(FRACPART(X3/10)*10),DRAWNULL),NODRAW
DRAWTEXT(Y3>=0,D-10,VAR2STR(Y3,0)),COLORMAGENTA
如果X3<10返回X3否则返回DRAWNULL
DRAWTEXT(Q3>=1,D-10,VAR2STR(Q3,0)),COLORGREEN,COLORMAGENTA
STICKLINE(H<1日前的H AND L>1日前的L ,C,O,1,0),COLORRED
输出Z:IF(H<1日前的H AND L>1日前的L,H,DRAWNULL)
输出U:IF(H<1日前的H AND L>1日前的L,L,DRAWNULL)
DRAWTEXT(Z<>0,Z,VAR2STR(Z,2))
DRAWTEXT(U<>0,U,VAR2STR(U,2))