未来函数检测结果如下:
该公式包含未来函数:BACKSET
指标源码:

原理解析:
A起点赋值:0
A低点赋值:0
A高点赋值:0
A次低赋值:0
B高点赋值:0
C低点赋值:0
D高点赋值:0
买入低位赋值:0
买入高位赋值:0
卖出高位赋值:0
卖出低位赋值:0
手动开关赋值:1
当满足条件1时,在横轴0.70纵轴0.01位置书写文字
AR1赋值:C的有效数据周期数
AR2赋值:CONST(AR1)
AR3赋值:AR2-AR1
输出K线根数:AR3+1,NODRAW,COLORYELLOW
A1赋值:(3日前的HIGH=HHV(HIGH,(2*3+1)))
B1赋值:A1的3过滤

C1赋值:BACKSET(B1,(3+1))

D1赋值:C1的3过滤
A2赋值:(3日前的最低价=LLV(最低价,(2*3+1)))
B2赋值:A2的3过滤

C2赋值:BACKSET(B2,(3+1))

D2赋值:C2的3过滤
E1赋值:(REF(2*3日内最低价最低值,1)+REF(2*3日内HIGH最高值,1))/2

E2赋值:(HIGH+最低价)/2
H1赋值:(D1 AND NOT(D2 AND E1>=E2)) OR ISLASTBAR OR 收盘价的有效数据周期数=1
H2赋值:D1 AND NOT(D2 AND E1>=E2)
L1赋值:D2 AND NOT(D1 AND E1=E2)
X1赋值:REF(上次H1距今天数,1)+1
如果L1返回最低价否则返回10000
G1赋值:F1>1日前的F1

I1赋值:BACKSET(G1,2)
LD赋值:I1>1日前的I1
L2赋值:LD OR ISLASTBAR OR 收盘价的有效数据周期数=1
X2赋值:REF(上次L2距今天数,1)+1
如果H2返回HIGH否则返回0
G2赋值:F2>1日前的F2

I2赋值:BACKSET(G2,2)

HD赋值:I2>1日前的I2
A3赋值:H

B3赋值:REF(H,REF(上次HD距今天数,1)+1)>REF(H,REF(上次HD距今天数,1)+2+REF(上次HD距今天数,REF(上次HD距今天数,1)+2))
D3赋值:A3 AND B3 AND HD

E3赋值:BACKSET(D3,REF(上次HD距今天数,1)+2)

HH赋值:E3>1日前的E3
A4赋值:L>REF(L,REF(上次LD距今天数,1)+1)
B4赋值:REF(L,REF(上次LD距今天数,1)+1)
D4赋值:A4 AND B4 AND LD

E4赋值:BACKSET(D4,REF(上次LD距今天数,1)+2)
LL赋值:E4>1日前的E4
H3赋值:HH OR ISLASTBAR OR C的有效数据周期数=1

X3赋值:REF(上次H3距今天数,1)+1

F3赋值:BACKSET(H3 AND 统计X3日满足LL的天数>0,LLVBARS(IF(LL,L,POW(10,20)),X3))
G3赋值:F3>1日前的F3

I3赋值:BACKSET(G3,2)

LZ赋值:I3>1日前的I3

L4赋值:LZ OR ISLASTBAR OR C的有效数据周期数=1
X4赋值:REF(上次L4距今天数,1)+1

F4赋值:BACKSET(L4 AND 统计X4日满足HH的天数>0,HHVBARS(IF(HH,H,-POW(10,20)),X4))
G4赋值:F4>1日前的F4

I4赋值:BACKSET(G4,2)

HZ赋值:I4>1日前的I4
K1赋值:BACKSET(ISLASTBAR,MIN(上次HZ距今天数,BARSLAST(LZ))+1)

K2赋值:K1>1日前的K1
UU赋值:BACKSET(ISLASTBAR,上次LD距今天数+1)
VV赋值:UU>1日前的UU
WW赋值:BACKSET(VV,REF(上次LD距今天数,1)+2)
XX赋值:WW>1日前的WW
UU2:=BACKSET(ISLASTBAR,上次HD距今天数+1)
VV2:=UU2>1日前的UU2
WW2:=BACKSET(VV2,REF(上次HD距今天数,1)+2)
XX2赋值:WW2>1日前的WW2
DRAWLINE(LD,L,HD,H,0),LINETHICK1,DOTLINE,COLOR0000FF
DRAWLINE(HD,H,LD,L,0),LINETHICK1,DOTLINE,COLOR00FF00
K赋值:CURRBARSCOUNT,NODRAW
DRAWNUMBER(HD,H,K),COLORLIRED,DRAWABOVE
DRAWNUMBER(LD,L,K),COLORFFFF00
高点赋值:上次HD距今天数
低点赋值:上次LD距今天数
J1赋值:BACKSET(ISLASTBAR,高点和低点的较小值+1)
J2赋值:J1>1日前的J1

起点A赋值:上次CURRBARSCOUNT=A起点+1距今天数,NODRAW
低点A赋值:上次CURRBARSCOUNT=A低点+1距今天数,NODRAW
高点A赋值:上次CURRBARSCOUNT=A高点+1距今天数,NODRAW
次低A赋值:上次CURRBARSCOUNT=A次低+1距今天数,COLORFF8800,NODRAW
高点B赋值:上次CURRBARSCOUNT=B高点+1距今天数,COLORFF0080,NODRAW
低点C:=上次CURRBARSCOUNT=C低点+1距今天数,NODRAW
高点D赋值:上次CURRBARSCOUNT=D高点+1距今天数,NODRAW

输出起点:1,COLORRED,NODRAW
T输出A1:起点A-低点A+1的绝对值,COLORGREEN,NODRAW
T输出A2:起点A-高点A的绝对值+1,COLORRED,NODRAW
T输出A3:起点A-次低A的绝对值+1,COLORGREEN,NODRAW
T输出B4:IF(B高点>0,起点A-高点B的绝对值+1,DRAWNULL)COLORFF8800,NODRAW
输出TC5:IF(C低点>0,起点A-低点C的绝对值+1,DRAWNULL)COLORLIRED,NODRAW
输出TD6:IF(D高点>0,起点A-高点D的绝对值+1,DRAWNULL)COLORRED,NODRAW

TB1赋值:TA3*TA2,NODRAW
输出拐点A:INTPART(TB1/TA1),COLORYELLOW,NODRAW
TB2赋值:TB4*TA3,NODRAW
输出拐点B:INTPART(TB2/TA2),COLORMAGENTA,NODRAW
TB3赋值:TC5*TB4,NODRAW
输出拐点C:INTPART(TB3/TA3),COLORLIRED,NODRAW
TB5赋值:TD6*TC5,NODRAW
输出拐点D:INTPART(TB5/TB4),COLORGREEN,NODRAW
当满足条件CURRBARSCOUNT=A起点-拐点A+1时,在H*1.5和L*0.95之间画柱状线
当满足条件CURRBARSCOUNT=A起点-拐点B+1时,在H*1.5和L*0.95之间画柱状线
当满足条件CURRBARSCOUNT=A起点-拐点C+1时,在H*1.5和L*0.95之间画柱状线
当满足条件CURRBARSCOUNT=A起点-拐点D+1时,在H*1.5和L*0.95之间画柱状线
当满足条件CURRBARSCOUNT=A起点-拐点A+1时,在H和L之间画柱状线
当满足条件CURRBARSCOUNT=A起点-拐点B+1时,在H和L之间画柱状线
当满足条件CURRBARSCOUNT=A起点-拐点C+1时,在H和L之间画柱状线
当满足条件CURRBARSCOUNT=A起点-拐点D+1时,在H和L之间画柱状线

DRAWLINE(CURRBARSCOUNT=A起点,H,CURRBARSCOUNT=A低点,L,0),COLORYELLOW,LINETHICK2
DRAWLINE(CURRBARSCOUNT=A低点,L,CURRBARSCOUNT=A高点,H,0),COLORYELLOW,LINETHICK2
DRAWLINE(CURRBARSCOUNT=A高点,H,CURRBARSCOUNT=A次低,L,0),COLORYELLOW,LINETHICK2
DRAWLINE(CURRBARSCOUNT=A次低,L,CURRBARSCOUNT=B高点,H,0),COLORFF7700,LINETHICK2
DRAWLINE(CURRBARSCOUNT=B高点,H,CURRBARSCOUNT=C低点,L,0),COLORGREEN,LINETHICK2
DRAWLINE(CURRBARSCOUNT=C低点,L,CURRBARSCOUNT=D高点,H,0),COLORLIRED,LINETHICK2

DRAWTEXT(CURRBARSCOUNT=A起点,H*1.01,VARCAT(('【起点】='),VAR2STR(1,0))),COLORRED,COLORRED
DRAWTEXT(CURRBARSCOUNT=A低点,L*0.99,VARCAT(('【TA1】='),VAR2STR(TA1,0))),COLORRED,COLORGREEN
DRAWTEXT(CURRBARSCOUNT=A高点,H*1.01,VARCAT(('【TA2】='),VAR2STR(TA2,0))),COLORRED,COLORGREEN
DRAWTEXT(CURRBARSCOUNT=A次低,L*0.99,VARCAT(('【TA3】='),VAR2STR(TA3,0))),COLORRED,COLORGREEN
DRAWTEXT(CURRBARSCOUNT=B高点,H*1.01,VARCAT(('【TB4】='),VAR2STR(TB4,0))),COLORRED,COLORRED
DRAWTEXT(CURRBARSCOUNT=C低点,L*0.99,VARCAT(('【TC5】='),VAR2STR(TC5,0))),COLORRED,COLORFF8800
DRAWTEXT(CURRBARSCOUNT=D高点,H*1.01,VARCAT(('【TD6】='),VAR2STR(TD6,0))),COLORRED,COLORYELLOW

DRAWTEXT(CURRBARSCOUNT=A起点-拐点A+1,L*0.95,VARCAT(('拐点A='),VAR2STR(拐点A,0))),COLORYELLOW
DRAWTEXT(CURRBARSCOUNT=A起点-拐点B+1,L*0.95,VARCAT(('拐点B='),VAR2STR(拐点B,0))),COLORMAGENTA
DRAWTEXT(CURRBARSCOUNT=A起点-拐点C+1,L*0.95,VARCAT(('拐点C='),VAR2STR(拐点C,0))),COLORLIRED
DRAWTEXT(CURRBARSCOUNT=A起点-拐点D+1,L*0.95,VARCAT(('拐点D='),VAR2STR(拐点D,0))),画白色
当满足条件CURRBARSCOUNT=A起点时,在H和23之间画图标

LL1A赋值:买入低位-1日前的L,NODRAW
GG1A赋值:买入高位-1日前的H,NODRAW
如果手动开关=1 AND 买入低位>买入高位 AND GG1A>LL1A返回LL1A否则返回DRAWNULL
如果手动开关=1 AND 买入低位>买入高位 AND GG1A>LL1A返回GG1A否则返回DRAWNULL
VAR1A赋值:SQRT(GG1/LL1)
VAR2A赋值:SQRT(VAR1A)
A赋值:GG1/SQRT(VAR1A)
B赋值:GG1/VAR1A
D赋值:GG1/(VAR1A+VAR2A-1)
{买C1输出A:CONST(A),COLORFF8800,NODRAW
买C2输出A:CONST(B),COLORFF8800,NODRAW
买C3输出A:CONST(D),COLORFF8800,NODRAW
}

IF(手动开关=1,DRAWLINE(CURRBARSCOUNT=买入低位,L,CURRBARSCOUNT=买入高位,H,0),DRAWNULL),COLORGREEN,LINETHICK3
买输出C1:DRAWLINE(CURRBARSCOUNT=买入高位,CONST(A),CURRBARSCOUNT=1,CONST(A),1),COLORFF8800,DOTLINE
买输出C2:DRAWLINE(CURRBARSCOUNT=买入高位,CONST(B),CURRBARSCOUNT=1,CONST(B),1),COLORFF8800,DOTLINE
输出买C3:DRAWLINE(CURRBARSCOUNT=买入高位,CONST(D),CURRBARSCOUNT=1,CONST(D),1),COLORFF8800,DOTLINE

DRAWTEXT(CURRBARSCOUNT=买入高位,CONST(A),VARCAT('买C1=',VAR2STR(CONST(A),2))),画白色
DRAWTEXT(CURRBARSCOUNT=买入高位,CONST(B),VARCAT('买C2=',VAR2STR(CONST(B),2))),画白色
DRAWTEXT(CURRBARSCOUNT=买入高位,CONST(D),VARCAT('买C3=',VAR2STR(CONST(D),2))),画白色
DRAWTEXT(CURRBARSCOUNT=买入低位,L,VARCAT('低位【A】',VAR2STR(L,2))),COLORGREEN
DRAWTEXT(CURRBARSCOUNT=买入高位,H,VARCAT('高位【B】',VAR2STR(H,2))),COLORRED
STICKLINE(CURRBARSCOUNT=买入高位,H,CONST(D),0,-1),COLORFF8800

GGB2赋值:卖出高位-1日前的H,NODRAW
LLB2赋值:卖出低位-1日前的L,NODRAW
如果手动开关=1 AND 卖出高位>卖出低位 AND GGB2>LLB2返回GGB2否则返回DRAWNULL
如果手动开关=1 AND 卖出高位>卖出低位 AND GGB2>LLB2返回LLB2否则返回DRAWNULL
VAR1C:=SQRT(GG3/LL3)
VAR2C:=SQRT(VAR1C)
F赋值:LL3*SQRT(VAR1C),NODRAW
G赋值:LL3*VAR1C,NODRAW
J赋值:LL3*(VAR1C+VAR2C-1),NODRAW
{卖C1输出A:CONST(F),COLORMAGENTA,NODRAW
卖C2输出A:CONST(G),COLORMAGENTA,NODRAW
卖C3输出A:CONST(J),COLORMAGENTA,NODRAW
}
IF(手动开关=1,DRAWLINE(CURRBARSCOUNT=卖出高位,H,CURRBARSCOUNT=卖出低位,L,0),DRAWNULL),COLORMAGENTA,LINETHICK3
卖输出C1:DRAWLINE(CURRBARSCOUNT=卖出低位, CONST(F), CURRBARSCOUNT=1,CONST(F),1),COLORMAGENTA,DOTLINE
卖输出C2:DRAWLINE(CURRBARSCOUNT=卖出低位, CONST(G), CURRBARSCOUNT=1,CONST(G),1),COLORMAGENTA,DOTLINE
输出卖C3:DRAWLINE(CURRBARSCOUNT=卖出低位, CONST(J), CURRBARSCOUNT=1,CONST(J),1),COLORMAGENTA,DOTLINE
DRAWTEXT(CURRBARSCOUNT=卖出低位, CONST(F),VARCAT('卖C1=',VAR2STR(CONST(F),2))),COLORYELLOW
DRAWTEXT(CURRBARSCOUNT=卖出低位, CONST(G),VARCAT('卖C2=',VAR2STR(CONST(G),2))),COLORYELLOW
DRAWTEXT(CURRBARSCOUNT=卖出低位, CONST(J),VARCAT('卖C3=',VAR2STR(CONST(J),2))),COLORYELLOW
DRAWTEXT(CURRBARSCOUNT=卖出高位,H,VARCAT('高位【A】',VAR2STR(H,2))),COLORRED
DRAWTEXT(CURRBARSCOUNT=卖出低位,L,VARCAT('低位【B】',VAR2STR(L,2))),COLORGREEN
STICKLINE(CURRBARSCOUNT=卖出低位,H,CONST(J),0,4),COLORMAGENTA
如果HD返回H否则返回L

声明:本站所有指标公式及文章仅供学习研究,并不构成投资建议,请勿以此为依据进行股票交易,由此引起的投资亏损与本站无关。指标公式网均来源互联网收集整理,如不慎侵犯了你的权益,请联系我们告知,我们将做删除处理。