最新更新 - 网站地图 -
您的当前位置:首页 > 股票公式 > 通达信公式 > 2017通达信指标公式 通达信黄金分割趋势线主图公式源码

2017通达信指标公式 通达信黄金分割趋势线主图公式源码

来源:网络 点击: 时间:2022-12-30 11:59:11

2017通达信指标公式 通达信黄金分割趋势线主图公式源码 www.beexiaomifeng.com小编为您提供

周期:=5;画趋势:=1;半分位:=50;N:=5;


日线:=IF(PERIOD=5,1,0);
CA3:=REF(C,1)*日线;
A1:=REF(HIGH,3)=HHV(HIGH,笔周期*3+1);
B1:=FILTER(A1,3); C1:=BACKSET(B1,3+1);
D1:=FILTER(C1,3);{高点}
A2:=REF(LOW,3)=LLV(LOW,笔周期*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;{高低点出现在同一K线上时可作取舍}
H1:=(D1 AND NOT(D2 AND E1>=E2)) OR BARSTATUS=2 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;
F1:=BACKSET(H1 AND COUNT(L1,X1)>0,LLVBARS(IF(L1,LOW,10000),X1));
G1:=F1>REF(F1,1);
I1:=BACKSET(G1,2);
LD:=I1>REF(I1,1);{过滤后低点}
L2:=LD OR BARSTATUS=2 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);{过滤后高点}
DRAWLINE(LD,L,HD,H,0),COLORYELLOW,LINETHICK1;
DRAWLINE(HD,H,LD,L,0),COLORYELLOW,LINETHICK1;
A3:=H;
B3:=REF(H,REF(BARSLAST(HD),1)+1)>REF(H,REF(BARSLAST(HD),1)+2+REF(BARSLAST(HD),REF(BARSLAST(HD),1)+2));
D3:=A3 AND B3 AND HD;
E3:=BACKSET(D3,REF(BARSLAST(HD),1)+2);
HH:=E3>REF(E3,1);{找出全部长期高点}

近0.382对数值:POW(低一,0.382对数值)*POW(高一,0.618对数值)COLORCYAN;
DRAWTEXT(CURRBARSCOUNT=1,近0.382对数值,STRCAT('近0.382位:',CON2STR(近0.382对数值,2))),COLORCYAN;

近半分位:POW(低一,0.5)*POW(高一,0.5),COLOR99FF66,LINETHICK2;
DRAWTEXT(CURRBARSCOUNT=1,近半分位,STRCAT('近半分位:',CON2STR(近半分位,2))),COLORGREEN;
近0.618对数值:POW(低一,0.618对数值)*POW(高一,0.382对数值),COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=1,近0.618对数值,STRCAT('近0.6182位:',CON2STR(近0.618对数值,2))),COLORMAGENTA;

STICKLINE(VV,高一,低一,0,1),COLOR99FF66;
STICKLINE(VV2 ,高一,低一,0,0),COLOR99FF66;

DRAWTEXT( VV=1 AND Q0>Q1,L,'C')COLORMAGENTA;
DRAWTEXT(VV2=1 AND Q0>Q1,H,'B')COLORMAGENTA;
DRAWTEXT( XX=1 AND Q0>Q1,L,'A')COLORMAGENTA;
DRAWTEXT(XX2=1 AND Q5>Q4 ,H,'◆')COLORMAGENTA;
DRAWTEXT(XXQ=1 AND Q5>Q4 ,L,'★')COLORMAGENTA;

DRAWTEXT( VV=1 AND Q0 DRAWTEXT(VV2=1 AND Q0 DRAWTEXT(XX2=1 AND Q0 DRAWTEXT(XX=1 ?AND Q5 DRAWTEXT(XX3Q=1 ?AND Q5 V00:= HIGH V01:= HIGHREF(LOW,1);
V02:= HIGH>REF(HIGH,1) AND LOW V03:= HIGH>REF(HIGH,1) AND LOW>REF(LOW,1);
V04:= REF(HIGH,2) < HIGH AND REF(LOW,2) < LOW AND REF(HIGH,2) > REF(HIGH,1) AND REF(LOW,2) < REF(LOW,1);
V1:= COUNT(V00,3)>=1 AND LLVBARS(LOW,3) = 1 AND V03;
V2:= COUNT(V00,4)>=1 AND LLVBARS(LOW,4) = 2 AND V04;
V3:= COUNT(V00,4)>=1 AND COUNT(V01 OR V02,4)=1 AND LLVBARS(LOW,4) = 1 AND V03;
V4:= COUNT(V00,5)>=1 AND COUNT(V01 OR V02,5)=2 AND LLVBARS(LOW,5) = 2 AND V04;
XG1:= V1 OR V2 OR V3 OR V4;
XG2:= C > REF(HIGH,1);
XG:=XG1 AND XG2;
涨停:=IF(REF(C,1)*1.095-C<0.01 ,1,0);
STICKLINE(涨停,OPEN,CLOSE,3,0),COLORRED;
STICKLINE(涨停,OPEN,CLOSE,2,0),COLORYELLOW;

?


更多股票公式相关资讯请关注www.beexiaomifeng.com

?


    Copyright 2018- www.dyjian.com/ 大宇股票知识网 海口美兰韩哲棚百货商行 版权所有 琼ICP备2023001966号

    免责声名:本站所发表的内容仅用于学术交流和学习,内容所带来的一切后果均与本站无关。若您发现本站存在您非授权的原创作品,请第一时间联系本站删除!

    Top