未来函数检测结果如下:
该公式包含未来函数:BACKSET
A1:=REF(HIGH,3)=HHV(HIGH,2*3+1);
B1:=FILTER(A1,3);
C1:=BACKSET(A1,3+1);
D1:=FILTER(C1,3);
A2:=REF(LOW,3)=LLV(LOW,2*3+1);
B2:=FILTER(A2,3);
C2:=BACKSET(B2,3+1);
D2:=FILTER(C2,3);
E1:=(REF(LLV(LOW,2*3),1)+REF(HHV(HIGH,2*3),1))/2;
E2:=(HIGH+LOW)/2;{股票指标网 整理}
H1:=(D1 AND NOT(D2 AND E1>=E2)) OR ISLASTBAR OR BARSCOUNT(CLOSE)=1;
H2:=D1 AND NOT(D2 AND E1>=E2);
L1:=D2 AND NOT(D1 AND E1=E2);
X1:=REF(BARSLAST(H1),1)+1;
AA:=LLVBARS(IF(L1,LOW,10000),X1);
BB:=IF(AA,AA,X1);
F1:=BACKSET(H1 AND COUNT(L1,X1)>0,BB);
G1:=F1>REF(F1,1);
I1:=BACKSET(G1,2);
LD:=I1>REF(I1,1);
L2:=LD OR ISLASTBAR OR BARSCOUNT(CLOSE)=1;
X2:=REF(BARSLAST(L2),1)+1;
F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS(IF(H2,HIGH,0),X2));
G2:=F2>REF(F2,1);
I2:=BACKSET(G2,2);
HD:=I2>REF(I2,1);
UU:=BACKSET(ISLASTBAR,BARSLAST(LD)+1);
VV:=UU>REF(UU,1);
UU2:=BACKSET(ISLASTBAR,BARSLAST(HD)+1);
VV2:=UU2>REF(UU2,1);
底:REF(L,BARSLAST(VV)),COLORRED,LINETHICK2;
顶:REF(H,BARSLAST(VV2)),COLORGREEN,LINETHICK2;
STICKLINE(VV,顶,底,0.1,0),COLORFF6633,LINETHICK3;
DRAWLINE(VV2,H,VV,L,0),COLORFF6633,LINETHICK3;
DRAWLINE(VV2,H,VV,顶,0),COLORFF6633,LINETHICK3;
STICKLINE(VV2 ,顶,底,0.1,0),COLORRED,LINETHICK3;
DRAWLINE(VV,L,VV2,H,0),COLORRED,LINETHICK3;
DRAWLINE(VV,L,VV2,底,0),COLORRED,LINETHICK3;
原理解析:
A1赋值:3日前的最高价=2*3+1日内最高价最高值
B1赋值:A1的3过滤
C1赋值:BACKSET(A1,3+1)
D1赋值:C1的3过滤
A2赋值:3日前的最低价=2*3+1日内最低价最低值
B2赋值:A2的3过滤
C2赋值:BACKSET(B2,3+1)
D2赋值:C2的3过滤
E1赋值:(REF(2*3日内最低价最低值,1)+REF(2*3日内最高价最高值,1))/2
E2赋值:(最高价+最低价)/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
如果AA返回AA否则返回X1
F1赋值:BACKSET(H1 AND 统计X1日满足L1的天数>0,BB)
G1赋值:F1>1日前的F1
I1赋值:BACKSET(G1,2)
LD赋值:I1>1日前的I1
L2赋值:LD OR ISLASTBAR OR 收盘价的有效数据周期数=1
X2赋值:REF(上次L2距今天数,1)+1
如果H2返回最高价否则返回0
G2赋值:F2>1日前的F2
I2赋值:BACKSET(G2,2)
HD赋值:I2>1日前的I2
UU赋值:BACKSET(ISLASTBAR,上次LD距今天数+1)
VV赋值:UU>1日前的UU
UU2:=BACKSET(ISLASTBAR,上次HD距今天数+1)
VV2:=UU2>1日前的UU2
输出底:REF(L,上次VV距今天数),画红色, 线宽为2
输出顶:REF(H,上次VV2距今天数),画绿色, 线宽为2
当满足条件VV时,在顶和底之间画柱状线
DRAWLINE(VV2,H,VV,L,0),COLORFF6633, 线宽为3
DRAWLINE(VV2,H,VV,顶,0),COLORFF6633, 线宽为3
当满足条件VV2 时,在顶和底之间画柱状线
DRAWLINE(VV,L,VV2,H,0),画红色, 线宽为3
DRAWLINE(VV,L,VV2,底,0),画红色, 线宽为3