飞狐时空坐标主图指标 EA

飞狐时空坐标主图指标

rn

源码

rn

{x1     18    1     100  x2     18    1     100}

rn

rn 

rn

a3:=PEAKBARS(4,x1,1);         a4:=TROUGHBARS(4,x2,1);

rn

a5:=PEAK(4,x1,1);             a6:=TROUGH(4,x2,1);    

rn

FH:=A3-INTPART(A3/7)*7-1;     FL:=A4-INTPART(A4/7)*7-1;  a7:=a5-a6;

rn

DRAWICON(a3=0,A5,9);   DRAWICON(a4=0,A6,8);

rn

DRAWNUMBER(a3=0,h*1.02,a4,0),COLORGREEN;   DRAWNUMBER(a4=0,l*0.98,a3,0),ColorD9B3FF; 

rn

F1:=IF(FH=1,0.191,IF(FH=2,0.382,IF(FH=3,0.5,IF(FH=4,0.618,IF(FH=5,0.809,if(fh=0,1,0))))));

rn

f2:=if(fh=1,1.191,if(fh=2,1.382,if(fh=3,1.5,if(fh=4,1.618,if(fh=5,1.809,if(fh=0,2,2.191))))));

rn

FZ1:=A6+A7*F1;  FZ2:=a6+a7*f2;   

rn

f3:=hhv(C,4)>fz1*0.94 AND llv(C,4)

rn

f4:=hhv(C,4)>fz2*0.94 AND llv(C,4)

rn

DRAWSL( f3,FZ1,0,10,0),ColorCDCDCD;  

rn

DRAWSL( f4,FZ2,0,10,0),ColorCDCDCD; 

rn

DRAWNUMBER(f3<>ref(f3,7) and f3<>ref(f3,14) and  f3 ,FZ1,F1*100,1),ColorE2FFD9;

rn

DRAWNUMBER(f4<>ref(f4,7) and f4<>ref(f4,14) and  f4 ,FZ2,F2*100,1),ColorE2FFD9;

rn

F5:=IF(Fl=1,0.191,IF(Fl=2,0.382,IF(Fl=3,0.5,IF(Fl=4,0.618,IF(Fl=5,0.809,if(fl=6,0,1))))));

rn

f6:=if(fl=1,1.191,if(fl=2,1.382,if(fl=3,1.5,if(fl=4,1.618,if(fl=5,1.809,if(fl=6,2,2.191))))));

rn

FZ5:=A5-A7*F5;  FZ6:=a5-a7*f6;   

rn

f7:=hhv(C,4)>fz5*0.94 AND llv(C,4)a3;

rn

f8:=hhv(C,4)>fz6*0.94 AND llv(C,4)a3;

rn

DRAWSL( f7,FZ5,0,10,0),Color00BBBB;  

rn

DRAWSL( f8,FZ6,0,10,0),Color00BBBB; 

rn

DRAWNUMBER(f7<>ref(f7,7) and f7<>ref(f7,14) and  f7,FZ5,F5*100,1),ColorE2FFD9;

rn

DRAWNUMBER(f8<>ref(f8,7) and f8<>ref(f8,14) and  f8,FZ6,F6*100,1),ColorFFF4FF;

rn

a8:=a3=5 or a3=8 or a3=13 or a3=21 or a3=34 or a3=55 or a3=89 or a3=144 or a3=233; 

rn

VERTLINE(a8 and (a4>a3 or a4<5)),Color00BBBB,POINTDOT; DRAWNUMBER(a8 and a4>a3,a5,a3,0),ColorCDCDCD;

rn

a9:=a4=5 or a4=8 or a4=13 or a4=21 or a4=34 or a4=55 or a4=89 or a4=144 or a4=233; 

rn

VERTLINE(a9 and (a4<5)),ColorCDCDCD,POINTDOT; DRAWNUMBER(a9 and a4

rn

DRAWNUMBER(ISLASTBAR,hhv(h,10)*1.02,a4,0),ColorD9B3FF,shift2;

rn

DRAWTEXT(ISLASTBAR,hhv(h,10)*1.02,’天’),ColorD9B3FF,shift6;

rn

DRAWNUMBER(ISLASTBAR,llv(l,10)*0.98,a3,0),COLORGREEN,shift2;

rn

DRAWTEXT(ISLASTBAR,llv(l,10)*0.98,’天’),COLORGREEN,shift6;

rn

gd1:=ref(a5,a4); gr1:=ref(date,a4+ref(a3,a4))+19000001;

rn

dd1:=a6;  dr1:=ref(date,a4)+19000001;

rn

gd2:=a5; gr2:=ref(date,a3)+19000001;

rn

dd2:=ref(a6,a3);  dr2:=ref(date,a3+ref(a4,a3))+19000001;

rn

高点:if(a4<5,gd1,gd2),LINETHICK0,COLORYELLOW;

rn

高点日期:if(a4<5,gr1,gr2),LINETHICK0,COLORYELLOW;

rn

低点:if(a4<5,dd1,dd2),LINETHICK0,COLORGREEN;

rn

低点日期:if(a4<5,dr1,dr2),LINETHICK0,COLORGREEN;

rn

飞狐时空坐标主图指标

© 版权声明
THE END
喜欢就支持一下吧
点赞69 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容