未来函数检测结果如下:
该公式包含未来函数:ZIG
该公式包含未来函数:BACKSET
该公式包含未来函数:DHIGH
该公式包含未来函数:DLOW
指标源码:
原理解析:
DA赋值:100
HI赋值:REFDATE(DA日内H最高值,DATE)
LO赋值:REFDATE(DA日内L最低值,DATE)
如果 到最后交易的周期<=DA返回C否则返回DRAWNULL
GZ赋值:EXP(LN(HI/LO)/10)
LH1赋值:SUM(IF(C1>=(HI/GZ),V,0),DA)
LH2赋值:SUM(IF(C1>=(HI/POW(GZ,2)) AND C1<(HI/GZ),V,0),DA)
LH3赋值:SUM(IF(C1>=(HI/POW(GZ,3)) AND C1<(HI/POW(GZ,2)),V,0),DA)
LH4赋值:SUM(IF(C1>=(HI/POW(GZ,4)) AND C1<(HI/POW(GZ,3)),V,0),DA)
LH5赋值:SUM(IF(C1>=(HI/POW(GZ,5)) AND C1<(HI/POW(GZ,4)),V,0),DA)
LH6赋值:SUM(IF(C1>=(HI/POW(GZ,6)) AND C1<(HI/POW(GZ,5)),V,0),DA)
LH7赋值:SUM(IF(C1>=(HI/POW(GZ,7)) AND C1<(HI/POW(GZ,6)),V,0),DA)
LH8赋值:SUM(IF(C1>=(HI/POW(GZ,8)) AND C1<(HI/POW(GZ,7)),V,0),DA)
LH9赋值:SUM(IF(C1>=(LO*GZ) AND C1
L2赋值:REFDATE(DA日内LH2最高值,DATE)
L3赋值:REFDATE(DA日内LH3最高值,DATE)
L4赋值:REFDATE(DA日内LH4最高值,DATE)
L5赋值:REFDATE(DA日内LH5最高值,DATE)
L6赋值:REFDATE(DA日内LH6最高值,DATE)
L7赋值:REFDATE(DA日内LH7最高值,DATE)
L8赋值:REFDATE(DA日内LH8最高值,DATE)
L9赋值:REFDATE(DA日内LH9最高值,DATE)
L10:=REFDATE(DA日内LH10最高值,DATE)
SS赋值:(L1+L2+L3+L4+L5+L6+L7+L8+L9+L10)
STICKLINE(CEILING(DA*L1/SS)*3>= 到最后交易的周期,HI*0.98,HI/GZ,9,0),COLOR3C3C3A
STICKLINE(CEILING(DA*L2/SS)*3>= 到最后交易的周期,HI/POW(GZ,1)*0.98,HI/POW(GZ,2),9,0),COLOR3C3C3A
STICKLINE(CEILING(DA*L3/SS)*3>= 到最后交易的周期,HI/POW(GZ,2)*0.98,HI/POW(GZ,3),9,0),COLOR3C3C3A
STICKLINE(CEILING(DA*L4/SS)*3>= 到最后交易的周期,HI/POW(GZ,3)*0.98,HI/POW(GZ,4),9,0),COLOR7C7C3A
STICKLINE(CEILING(DA*L5/SS)*3>= 到最后交易的周期,HI/POW(GZ,4)*0.98,HI/POW(GZ,5),9,0),COLOR3C3C3A
STICKLINE(CEILING(DA*L6/SS)*3>= 到最后交易的周期,HI/POW(GZ,5)*0.98,HI/POW(GZ,6),9,0),COLOR3C3C3A
STICKLINE(CEILING(DA*L7/SS)*3>= 到最后交易的周期,HI/POW(GZ,6)*0.98,HI/POW(GZ,7),9,0),COLOR3C3C3A
STICKLINE(CEILING(DA*L8/SS)*3>= 到最后交易的周期,LO*POW(GZ,2),LO*POW(GZ,3)*0.98,9,0),COLOR3C3C3A
STICKLINE(CEILING(DA*L9/SS)*3>= 到最后交易的周期,LO*POW(GZ,1),LO*POW(GZ,2)*0.98,9,0),COLOR3C3C3A
STICKLINE(CEILING(DA*L10/SS)*3>= 到最后交易的周期,LO,LO*POW(GZ,1)*0.98,9,0),COLOR3C3C3A
{HD LD ZIG}
HD赋值:FILTER(BACKSET(FILTER(5日前的H=13日内H最高值,5),5+1),6)
{高点}
LD赋值:FILTER(BACKSET(FILTER(5日前的L=21日内L最低值,6),6),5)
{低点}
DRAWLINE(LD,L,HD,H,0),COLORRED,LINETHICK2
DRAWLINE(HD,H,LD,L,0),COLORGREEN
{A B }
J1赋值:BACKSET( 到最后交易的周期=2 ,MIN(上次HD距今天数,BARSLAST(LD))+1)
J2赋值:J1>1日前的J1
如果HD返回H否则返回L
如果LD返回H否则返回L
输出{60天内最高低点黄金分割}
CURR: 到最后交易的周期,NODRAW
GTT赋值:CONST(上次CONST(FINDHIGH(H,0,60,1距今天数)=H))+1
输出SX跌H:CONST(IF(GTT=1,H,GTT-1日前的H)),COLORGREEN
DTT赋值:CONST(上次CONST(FINDLOW(L,0,60,1距今天数)=L))+1
输出SX涨L:CONST(IF(DTT=1,L,DTT-1日前的L)),COLORGREEN
输出X191:IF( 到最后交易的周期<=50,SX跌H-(SX跌H-SX涨L)*0.191,DRAWNULL),COLORGREEN,LINETHICK1
DRAWTEXT(CURR=50,(X191)*1.015,STRCAT(STRCAT('0.806 ',CON2STR(X191,3)),'元')),COLORGREEN
输出X382:IF(CURR<=50,SX跌H-(SX跌H-SX涨L)*0.382,DRAWNULL),COLORGREEN,LINETHICK1
DRAWTEXT(CURR=50,(X382)*1.015,STRCAT(STRCAT('0.618% ',CON2STR(X382,3)),'元')),COLORGREEN
输出X500:IF(CURR<=50,SX跌H-(SX跌H-SX涨L)*0.500,DRAWNULL),COLORGREEN,LINETHICK3
DRAWTEXT(CURR=50,(X500)*1.015,STRCAT(STRCAT('0.500% ',CON2STR(X500,3)),'元')),COLORGREEN
输出X618:IF(CURR<=50,SX跌H-(SX跌H-SX涨L)*0.618,DRAWNULL),COLORGREEN,LINETHICK1
DRAWTEXT(CURR=50,(X618)*1.015,STRCAT(STRCAT('0.382 ',CON2STR(X618,3)),'元')),COLORGREEN
输出X809:IF(CURR<=50,SX跌H-(SX跌H-SX涨L)*0.809,DRAWNULL),COLORGREEN,LINETHICK1
DRAWTEXT(CURR=50,(X809)*1.015,STRCAT(STRCAT('0.191% ',CON2STR(X809,3)),'元')),COLORGREEN
当满足条件CURR=51时,在SX涨L和SX跌H之间画柱状线
当满足条件CURR=50时,在SX跌H*1.008和'60天内黄金分割最高点'位置书写文字
当满足条件CURR=50时,在SX涨L*1.008和'60天内黄金分割最低点'位置书写文字
{60日KX}
AAA赋值: 到最后交易的周期<=60
当满足条件AAA AND C>=O时,在C和O之间画柱状线
当满足条件AAA AND C>=O时,在C和O之间画柱状线
当满足条件AAA AND C>=O时,在C和O之间画柱状线
当满足条件AAA AND C>=O时,在C和O之间画柱状线
当满足条件AAA AND C>=O时,在C和O之间画柱状线
当满足条件AAA AND C>=O时,在C和O之间画柱状线
当满足条件AAA AND C>=O时,在C和O之间画柱状线
当满足条件AAA AND C>=O时,在H和L之间画柱状线
当满足条件AAA AND C<=O时,在C和O之间画柱状线
当满足条件AAA AND C<=O时,在C和O之间画柱状线
当满足条件AAA AND C<=O时,在C和O之间画柱状线
当满足条件AAA AND C<=O时,在C和O之间画柱状线
当满足条件AAA AND C<=O时,在C和O之间画柱状线
当满足条件AAA AND C<=O时,在C和O之间画柱状线
当满足条件AAA AND C<=O时,在C和O之间画柱状线
当满足条件AAA AND C<=O时,在H和L之间画柱状线