山人断股通达信公式 副图 源码附图
N:=14;N1:=7;P:=5;
AA1:=(C)/MA(C,3)*100;
QS1:=DMA(AA1,V/CAPITAL),COLORWHITE,LINETHICK2;
BB1:=MA(C,3)/C*100;
QS2:=DMA(BB1,V/CAPITAL);
QS:QS1-QS2,COLORRED,LINETHICK2;
0;
RSI1:=QS,COLORRED,LINETHICK2;
AA:=REF(RSI1,N)=HHV(RSI1,2*N+1);
BB:=BACKSET(AA,N+1);
CC:=FILTER(BB,N) AND RSI1=HHV(RSI1,N+1);
A11:=BARSLAST(REF(CC,1));
顶背离:=REF(CLOSE,A11+1)<CLOSE AND REF(RSI1,A11+1)>RSI1 AND CC;
DRAWLINE(CC,RSI1,FILTER(顶背离>0,5),RSI1,0),COLORGREEN,LINETHICK2;
AA2:=REF(RSI1,N)=LLV(RSI1,2*N+1);
BB2:=BACKSET(AA2,N+1);
CC2:=FILTER(BB2,N) AND RSI1=LLV(RSI1,N+1);
A22:=BARSLAST(REF(CC2,1));
底背离:=REF(CLOSE,A22+1)>CLOSE AND REF(RSI1,A22+1)<RSI1 AND CC2;
DRAWLINE(CC2,RSI1,FILTER(底背离>0,5),RSI1,0),COLORMAGENTA,LINETHICK2;
AAA:=REF(RSI1,N1)=HHV(RSI1,2*N1+1);
BBB:=BACKSET(AAA,N1+1);
CCC:=FILTER(BBB,N1) AND RSI1=HHV(RSI1,N1+1);
AA11:=BARSLAST(REF(CCC,1));
顶背离7:=REF(CLOSE,AA11+1)<CLOSE AND REF(RSI1,AA11+1)>RSI1 AND CCC;
DRAWLINE(CCC,RSI1,FILTER(顶背离>0,5),RSI1,0),COLORGREEN,LINETHICK2;
AAA2:=REF(RSI1,N1)=LLV(RSI1,2*N1+1);
BBB2:=BACKSET(AAA2,N1+1);
CCC2:=FILTER(BBB2,N1) AND RSI1=LLV(RSI1,N1+1);
AA22:=BARSLAST(REF(CCC2,1));
底背离7:=REF(CLOSE,AA22+1)>CLOSE AND REF(RSI1,A22+1)<RSI1 AND CCC2;
DRAWLINE(CCC2,RSI1,FILTER(底背离>0,5),RSI1,0),COLORMAGENTA,LINETHICK2;
A1:=REF(RSI1,P)=HHV(RSI1,2*P+1);
B1:=FILTER(A1,P);
C1:=BACKSET(B1,P+1);
D1:=FILTER(C1,P);{高点}
A2:=REF(RSI1,P)=LLV(RSI1,2*P+1);
B2:=FILTER(A2,P);
C2:=BACKSET(B2,P+1);
D2:=FILTER(C2,P);{低点}
前期高点:REF(RSI1,BARSLAST(D1)),COLORFF00FF,NODRAW;
前期低点:REF(RSI1,BARSLAST(D2)),COLOR00FF00,NODRAW;
向前期高点:CROSS(RSI1,前期高点*1.01),NODRAW;
相对能量:(RSI1-前期低点)/(前期高点-前期低点)*100,COLORYELLOW,NODRAW;
R11:=BACKSET(ISLASTBAR,BARSLAST(D1)+1);
S11:=R11>REF(R11,1);{股票指标网 整理}
DRAWLINE(D1,RSI1,S11,RSI1,1),COLORYELLOW;
T11:=BACKSET(ISLASTBAR,BARSLAST(D2)+1);
U11:=T11>REF(T11,1);
DRAWLINE(D2,RSI1,U11,RSI1,1),COLOR00FF00;
STICKLINE(C>0,前期低点,前期低点,1,0),COLOR00FF00;
STICKLINE(C>0,前期高点,前期高点,1,0),COLORFF00FF;
未来函数检测结果如下:
该公式包含未来函数:BACKSET
该公式包含未来函数:CAPITAL
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
N赋值:14
N1:=7
P赋值:5
AA1赋值:(C)/C的3日简单移动平均*100
QS1赋值:DAA1的V/CAPITAL日简单移动平均,画白色,LINETHICK2
BB1赋值:C的3日简单移动平均/C*100
QS2赋值:DBB1的V/CAPITAL日简单移动平均
输出QS:QS1-QS2,画红色,LINETHICK2
0
RSI1赋值:QS,画红色,LINETHICK2
AA赋值:N日前的RSI1=2*N+1日内RSI1最高值
BB赋值:BACKSET(AA,N+1)
CC赋值:BB的N过滤 AND RSI1=N+1日内RSI1最高值
A11赋值:上次1日前的CC距今天数
顶背离赋值:A11+1日前的收盘价<收盘价 AND A11+1日前的RSI1>RSI1 AND CC
DRAWLINE(CC,RSI1,顶背离>0的5过滤,RSI1,0),COLORGREEN,LINETHICK2
AA2:=N日前的RSI1=2*N+1日内RSI1最低值
BB2:=BACKSET(AA2,N+1)
CC2:=BB2的N过滤 AND RSI1=N+1日内RSI1最低值
A22赋值:上次1日前的CC2距今天数
底背离赋值:A22+1日前的收盘价>收盘价 AND A22+1日前的RSI1
DRAWLINE(CC2,RSI1,底背离>0的5过滤,RSI1,0),COLORMAGENTA,LINETHICK2
AAA赋值:N1日前的RSI1=2*N1+1日内RSI1最高值
BBB赋值:BACKSET(AAA,N1+1)
CCC赋值:BBB的N1过滤 AND RSI1=N1+1日内RSI1最高值
AA11:=上次1日前的CCC距今天数
顶背离7:=AA11+1日前的收盘价<收盘价 AND AA11+1日前的RSI1>RSI1 AND CCC
DRAWLINE(CCC,RSI1,顶背离>0的5过滤,RSI1,0),COLORGREEN,LINETHICK2
AAA2:=N1日前的RSI1=2*N1+1日内RSI1最低值
BBB2赋值:BACKSET(AAA2,N1+1)
CCC2赋值:BBB2的N1过滤 AND RSI1=N1+1日内RSI1最低值
AA22:=上次1日前的CCC2距今天数
底背离7:=AA22+1日前的收盘价>收盘价 AND A22+1日前的RSI1
DRAWLINE(CCC2,RSI1,底背离>0的5过滤,RSI1,0),COLORMAGENTA,LINETHICK2
A1赋值:P日前的RSI1=2*P+1日内RSI1最高值
B1赋值:A1的P过滤
C1赋值:BACKSET(B1,P+1)
D1赋值:C1的P过滤
{高点}
A2赋值:P日前的RSI1=2*P+1日内RSI1最低值
B2赋值:A2的P过滤
C2赋值:BACKSET(B2,P+1)
D2赋值:C2的P过滤
输出{低点}
前期高点:REF(RSI1,上次D1距今天数),COLORFF00FF,NODRAW
输出前期低点:REF(RSI1,上次D2距今天数),COLOR00FF00,NODRAW
输出向前期高点:RSI1上穿前期高点*1.01,NODRAW
输出相对能量:(RSI1-前期低点)/(前期高点-前期低点)*100,画黄色,NODRAW
R11赋值:BACKSET(ISLASTBAR,上次D1距今天数+1)
S11赋值:R11>1日前的R11
{股票指标网 整理}
DRAWLINE(D1,RSI1,S11,RSI1,1),画黄色
T11赋值:BACKSET(ISLASTBAR,上次D2距今天数+1)
U11赋值:T11>1日前的T11
DRAWLINE(D2,RSI1,U11,RSI1,1),COLOR00FF00
当满足条件C>0时,在前期低点和前期低点之间画柱状线
当满足条件C>0时,在前期高点和前期高点之间画柱状线