您现在的位置:程序化交易>> 股票公式>> 大智慧>> 大智慧公式>>正文内容

波段黄金分割公式-(公式、源码)[大智慧公式]

相关标签:

 

{波段黄金分割指标----源码}

a1:=zig(3,N); {N自行设置:一般为2、3、5、8、13、21等等}

a2:=last(a1>ref(a1,1));
a3:=last(a1<ref(a1,1));

tt1:=peak(1,N,1);
bb1:=trough(2,N,1);

H1:=tt1-(tt1-bb1)*0.236;
H2:=tt1-(tt1-bb1)*0.382;
H3:=tt1-(tt1-bb1)*0.5;
H4:=tt1-(tt1-bb1)*0.618;
H5:=tt1-(tt1-bb1)*0.764;
H6:=tt1-(tt1-bb1)*1.0;
H7:=tt1-(tt1-bb1)*1.27;
H8:=tt1-(tt1-bb1)*1.618;

L1:=bb1+(tt1-bb1)*0.236;
L2:=bb1+(tt1-bb1)*0.382;
L3:=bb1+(tt1-bb1)*0.5;
L4:=bb1+(tt1-bb1)*0.618;
L5:=bb1+(tt1-bb1)*0.764;
L6:=bb1+(tt1-bb1)*1.0;
L7:=bb1+(tt1-bb1)*1.27;
L8:=bb1+(tt1-bb1)*1.618;

stickline(a3>0,tt1,tt1,8,0),linethick2,colorred;
stickline(a2>0,bb1,bb1,8,0),linethick2,colorred;

stickline(a3>0,H1,H1,8,0),linethick0,colorFF99CC;
stickline(a3>0,H2,H2,8,0),linethick0,colorFF99CC;
stickline(a3>0,H3,H3,8,0),linethick0,colorFF99CC;
stickline(a3>0,H4,H4,8,0),linethick0,colorFF99CC;
stickline(a3>0,H5,H5,8,0),linethick0,colorFF99CC;
stickline(a3>0,H6,H6,8,0),linethick0,colorFF99CC;
stickline(a3>0,H7,H7,8,0),linethick0,colorFF99CC;
stickline(a3>0,H8,H8,8,0),linethick0,colorFF99CC;

drawtext(a3=1,H1,'23.6%'),linethick0,colorFF99CC;
drawtext(a3=1,H2,'38.2%'),linethick0,colorFF99CC;
drawtext(a3=1,H3,'50%'),linethick0,colorFF99CC;
drawtext(a3=1,H4,'61.8%'),linethick0,colorFF99CC;
drawtext(a3=1,H5,'76.4%'),linethick0,colorFF99CC;
drawtext(a3=1,H6,'99.99%'),linethick0,colorFF99CC;
drawtext(a3=1,H7,'127%'),linethick0,colorFF99CC;
drawtext(a3=1,H8,'161.8%'),linethick0,colorFF99CC;

stickline(a2>0,L1,L1,8,0),linethick0,colorFF99CC;
stickline(a2>0,L2,L2,8,0),linethick0,colorFF99CC;
stickline(a2>0,L3,L3,8,0),linethick0,colorFF99CC;
stickline(a2>0,L4,L4,8,0),linethick0,colorFF99CC;
stickline(a2>0,L5,L5,8,0),linethick0,colorFF99CC;
stickline(a2>0,L6,L6,8,0),linethick0,colorFF99CC;
stickline(a2>0,L7,L7,8,0),linethick0,colorFF99CC;
stickline(a2>0,L8,L8,8,0),linethick0,colorFF99CC;

drawtext(a2=1,L1*1.015,'23.6%'),linethick0,colorFF99CC;
drawtext(a2=1,L2*1.015,'38.2%'),linethick0,colorFF99CC;
drawtext(a2=1,L3*1.015,'50%'),linethick0,colorFF99CC;
drawtext(a2=1,L4*1.015,'61.8%'),linethick0,colorFF99CC;
drawtext(a2=1,L5*1.015,'76.4%'),linethick0,colorFF99CC;
drawtext(a2=1,L6*1.015,'99.99%'),linethick0,colorFF99CC;
drawtext(a2=1,L7*1.015,'127%'),linethick0,colorFF99CC;
drawtext(a2=1,L8*1.015,'161.8%'),linethick0,colorFF99CC;{程序化交易 www.cxh99.com }

 

公式导入教程: 【通达信公式源码导入方法教程】 【同花顺公式源码导入方法教程】 【大智慧新一代公式源码导入方法教程

 

 

有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友

可联系技术人员 QQ: 262069696  点击在线交流或微信:cxhjy888 进行 有偿收费 编写!(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)

怎么收费,代编流程等详情请点击查阅!

(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)

 


【字体: 】【打印文章】【查看评论

相关文章

    没有相关内容