以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://weistock.com/bbs/index.asp) -- 公式模型编写问题提交 (http://weistock.com/bbs/list.asp?boardid=4) ---- 哪位大哥帮帮忙,兄弟急需一个真正的转折画线的公式 (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=87666) |
-- 作者:落生1 -- 发布时间:2015/11/24 12:48:56 -- 哪位大哥帮帮忙,兄弟急需一个真正的转折画线的公式 请问 下面的画线公式能通过编辑,但是在主图上显示不出来呢,哪位大哥帮兄弟弄弄,谢谢了 input:n(5,5,30); fh:=high; fl:=low; ///以下找历史最高点,hh1表示最高价,phh1表示最高点位置/// hh1:=fh[1]; phh1:=1; for i=1 to datacount do //从第1条K线开始,循环执行下面3条复合语句,直到K线结束 if hh1<fh then begin //判断 hh1:=fh; phh1:=i; //用hh1单值变量记录历史最高价,phh1记录位置 end; ///以下找phh1之后的最低点,ll表示最低价,pll最低点位置 if phh1<datacount then begin ll:=fl[phh1+1]; for i=phh1 to datacount do if ll>fl then begin ll:=fl; pll:=i; end; end; tj:=peakbars(high,n,1)=0; nstart:=max(lbound(tj),phh1+1); if nstart<=datacount then begin hh2:=0; for i=nstart to datacount do if tj then begin if hh2<fh then begin hh2:=fh; phh2:=i; end; end; end; //////以下画线/////////// drawline(barpos=phh1,high,barpos=phh2,high,1),colormagenta; drawline(barpos=phh1,high,barpos=pll,low,1),coloryellow; |
-- 作者:落生1 -- 发布时间:2015/11/24 12:57:13 -- 给帮帮忙吧老师 |
-- 作者:jinzhe -- 发布时间:2015/11/24 13:06:33 -- 看不懂你代码的逻辑,就说说你要的画线需要实现什么目标 |
-- 作者:落生1 -- 发布时间:2015/11/24 13:12:17 -- Z字转向的目标,但是我用网络上其他的Z字画线公式实现不了,我的要求, |
-- 作者:jinzhe -- 发布时间:2015/11/24 13:24:43 -- 金字塔有自带的zig函数,不需要写其他的 |