请问 下面的画线公式能通过编辑,但是在主图上显示不出来呢,哪位大哥帮兄弟弄弄,谢谢了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;
看不懂你代码的逻辑,就说说你要的画线需要实现什么目标
Z字转向的目标,但是我用网络上其他的Z字画线公式实现不了,我的要求,