龙听期货论坛's Archiver

龙听 发表于 2018-10-25 16:20

文华、博易指标公式(黄金分割线)

博易效果:[attach]4893[/attach]


源码:(N值89)

[code]
A:=REF(HHV(H,N),2);
B:=REF(LLV(L,N),2);
H191:A-(A-B)*0.191,POINTDOT,COLORFFFF00,PRECIS0;
H382:A-(A-B)*0.382,POINTDOT,COLOR80FFFF,PRECIS0;
H50:A-(A-B)*0.5,POINTDOT,COLOR80FF00,PRECIS0;
H618:A-(A-B)*0.618,POINTDOT,LINETHICK3,COLORFF00FF,PRECIS0;
H809:A-(A-B)*0.809,POINTDOT,COLOR4080FF,PRECIS0;
STICKLINE(C>=O OR (C=O AND C>REF(C,1)),O,C,4,1),COLORRED;
STICKLINE((C>=O AND C<>H) OR (C=O AND C>REF(C,1)),C,H,0.1,0),COLORRED;
STICKLINE((C>=O AND L<>O) OR (C=O AND C>REF(C,1)),L,O,0.1,0),COLORRED;
STICKLINE(C<O OR (C=O AND C>REF(C,1)),O,C,4,0),COLORCYAN;
STICKLINE((C<O AND C<>H) OR (C=O AND C>REF(C,1)),C,H,0.1,1),COLORCYAN;
STICKLINE((C<O AND L<>O) OR (C=O AND C>REF(C,1)),L,O,0.1,1),COLORCYAN;

DRAWNUMBER(ISLASTBAR,H191,H191,0);
DRAWNUMBER(ISLASTBAR,H382,H382,0);
DRAWNUMBER(ISLASTBAR,H50,H50,0);
DRAWNUMBER(ISLASTBAR,H618,H618,0);
DRAWNUMBER(ISLASTBAR,H809,H809,0);
[/code]


文华效果:
[attach]4894[/attach]


源码:

[code]
A:=REF(HHV(H,89),2);
B:=REF(LLV(L,89),2);
H191:A-(A-B)*0.191,COLORRED;
H382:A-(A-B)*0.382,COLORGREEN;
H50:A-(A-B)*0.5,COLORBLUE;
H618:A-(A-B)*0.618,COLORYELLOW;
H809:A-(A-B)*0.809,COLORCYAN;
DRAWTEXT(ISLASTBAR>0,H191,'0.191');
DRAWTEXT(ISLASTBAR>0,H382,'0.382');
DRAWTEXT(ISLASTBAR>0,H50,'0.5');
DRAWTEXT(ISLASTBAR>0,H618,'0.618');
DRAWTEXT(ISLASTBAR>0,H809,'0.809');
TMP:=OPEN-CLOSE;
DRAWLINE(TMP>0.00001,HIGH,TMP>0.00001,OPEN,COLORCYAN);
DRAWLINE(TMP>0.00001,LOW,TMP>0.00001,CLOSE,COLORCYAN);
DRAWLINE(TMP<-0.00001,HIGH,TMP<-0.00001,CLOSE,COLORRED);
DRAWLINE(TMP<-0.00001,LOW,TMP<-0.00001,OPEN,COLORRED);
DRAWLINE(ABS(TMP)<0.00001,LOW,ABS(TMP)<0.00001,OPEN,COLORWHITE);
DRAWLINE(ABS(TMP)<0.00001,HIGH,ABS(TMP)<0.00001,OPEN,COLORWHITE);
STICKLINE(TMP>0,OPEN,CLOSE,COLORCYAN,0);
STICKLINE(TMP<=0,OPEN,CLOSE,COLORRED,1);
[/code]

龙听 发表于 2018-10-25 16:20

原址:[url]http://blog.sina.com.cn/s/blog_505cc3030100hd75.html[/url]

页: [1]