通达信新良友居高点、低点
AB:=DRAWLINE(HIGH>=HHV(HIGH,10),HIGH,LOW<=LLV(LOW,3),HHV(HIGH,3),1),COLORYELLOW;
DRAWLINE(LOW<=LLV(LOW,120),LOW,HHV(H,6)<=HHV(H,10),LLV(LOW,6),1),COLORBLUE;
VA11:=HIGH>=HHV(HIGH,60);
V1:=(REF(VA11,1)>0 AND VA11<1);
VA12:=LOW<=LLV(LOW,60);
V2:=REF(VA12,1)>0 AND VA12<1;
CD:DRAWLINE(V2,LOW,V1,LLV(LOW,6),1),COLOR0099FF;
DRAWTEXT(CROSS(C,AB),L*0.98,'B'),COLORGREEN;
DRAWTEXT(CROSS(CD,C),L*0.98,'注'),COLORYELLOW;
A1:=REF(H,8)=HHV(H,2*8+1);
{股票指标网}
B1:=FILTER(A1,8);
C1:=BACKSET(B1,8+1);
D1:=FILTER(C1,8);{高点}
R11:=BACKSET(ISLASTBAR,BARSLAST(D1)+1);S11:=R11>REF(R11,1);
DRAWLINE(D1,H,S11,H,1),COLORBLUE,LINETHICK2;
A2:=REF(L,8)=LLV(L,2*8+1);
B2:=FILTER(A2,8);
C2:=BACKSET(B2,8+1);
D2:=FILTER(C2,8);{低点}
T11:=BACKSET(ISLASTBAR,BARSLAST(D2)+1);U11:=T11>REF(T11,1);
DRAWLINE(D2,L,U11,L,1),COLORBLUE,LINETHICK2;
M:=INTPART(3*8/5);
A12:=REF(H,M)=HHV(H,2*M+1);
B12:=FILTER(A12,M);
C12:=BACKSET(B12,M+1);
D12:=FILTER(C12,M);{高点}
R112:=BACKSET(ISLASTBAR,BARSLAST(D12)+1);S112:=R112>REF(R112,1);
DRAWLINE(D12,H,S112,H,1),COLORRED,LINETHICK2;
A22:=REF(L,M)=LLV(L,2*M+1);
B22:=FILTER(A22,M);
C22:=BACKSET(B22,M+1);
D22:=FILTER(C22,M);{低点}
T112:=BACKSET(ISLASTBAR,BARSLAST(D22)+1);U112:=T112>REF(T112,1);
DRAWLINE(D22,L,U112,L,1),COLORRED,LINETHICK2;
VAR1111:=BACKSET(REF(HIGH,2)=HHV(HIGH,5),3);
VAR2222:=CROSS(VAR1111,0.9);
VAR3333:=BACKSET(REF(LOW,2)=LLV(LOW,5),3);
VAR4444:=CROSS(VAR3333,0.9);
压力:= REF(HIGH,BARSLAST(VAR2222));
STICKLINE(CLOSE,REF(HIGH,BARSLAST(VAR2222)),REF(HIGH,BARSLAST(VAR2222)),0.5,1),COLOREA91B5,LINETHICK3;
支撑:= REF(LOW,BARSLAST(VAR4444));
STICKLINE(CLOSE,REF(LOW,BARSLAST(VAR4444)),REF(LOW,BARSLAST(VAR4444)),0.5,1),COLOR00B4FF,LINETHICK3;
未来函数检测结果如下:
该公式包含未来函数:BACKSET
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
AB赋值:DRAWLINE(最高价>=10日内最高价最高值,最高价,最低价<=3日内最低价最低值,3日内最高价最高值,1),画黄色
DRAWLINE(最低价<=120日内最低价最低值,最低价,6日内H最高值<=10日内H最高值,6日内最低价最低值,1), 画蓝色
VA11赋值:最高价>=60日内最高价最高值
V1赋值:(1日前的VA11>0 AND VA11<1)
VA12赋值:最低价<=60日内最低价最低值
V2赋值:1日前的VA12>0 AND VA12<1
输出
CD:DRAWLINE(V2,最低价,V1,6日内最低价最低值,1),COLOR0099FF
DRAWTEXT(C上穿AB,L*0.98,'B'),画绿色
DRAWTEXT(CD上穿C,L*0.98,'注'),画黄色
A1赋值:8日前的H=2*8+1日内H最高值
{股票指标网}
B1赋值:A1的8过滤
C1赋值:BACKSET(B1,8+1)
D1赋值:C1的8过滤
{高点}
R11赋值:BACKSET(ISLASTBAR,上次D1距今天数+1)
S11赋值:R11>1日前的R11
DRAWLINE(D1,H,S11,H,1), 画蓝色, 线宽为2
A2赋值:8日前的L=2*8+1日内L最低值
B2赋值:A2的8过滤
C2赋值:BACKSET(B2,8+1)
D2赋值:C2的8过滤
{低点}
T11赋值:BACKSET(ISLASTBAR,上次D2距今天数+1)
U11赋值:T11>1日前的T11
DRAWLINE(D2,L,U11,L,1), 画蓝色, 线宽为2
M赋值:INTPART(3*8/5)
A12:=M日前的H=2*M+1日内H最高值
B12赋值:A12的M过滤
C12:=BACKSET(B12,M+1)
D12:=C12的M过滤
{高点}
R112:=BACKSET(ISLASTBAR,上次D12距今天数+1)
S112:=R112>1日前的R112
DRAWLINE(D12,H,S112,H,1),画红色, 线宽为2
A22:=M日前的L=2*M+1日内L最低值
B22:=A22的M过滤
C22:=BACKSET(B22,M+1)
D22:=C22的M过滤
{低点}
T112:=BACKSET(ISLASTBAR,上次D22距今天数+1)
U112:=T112>1日前的T112
DRAWLINE(D22,L,U112,L,1),画红色, 线宽为2
VAR1111赋值:BACKSET(2日前的最高价=5日内最高价最高值,3)
VAR2222赋值:VAR1111上穿0.9
VAR3333赋值:BACKSET(2日前的最低价=5日内最低价最低值,3)
VAR4444赋值:VAR3333上穿0.9
压力赋值: REF(最高价,上次VAR2222距今天数)
STICKLINE(收盘价,REF(最高价,上次VAR2222距今天数),REF(最高价,上次VAR2222距今天数),0.5,1),COLOREA91B5, 线宽为3
支撑赋值: REF(最低价,上次VAR4444距今天数)
STICKLINE(收盘价,REF(最低价,上次VAR4444距今天数),REF(最低价,上次VAR4444距今天数),0.5,1),COLOR00B4FF, 线宽为3