飞狐的这个公式,金字塔里通不过。
语句末尾缺少一个分号
input:n(3);
fc:=close;
mhn:=ma(high,n);
mln:=ma(low,n);
hld:=0*close;
tmp:=setlbound(hld,n);
for i=n+1 to datacount do begin
if fc[i]>mhn[i-1] then
hld[i]:=1;
else if fc[i]<mln[i-1] then
hld[i]:=-1;
else
hld[i]:=hld[i-1];
end;
hilo:=if(hld=-1,ma(h,n),ma(l,n));
STICKLINE(HLd=1 and ref(HLd,1)=1, HiLo,ref(HiLo,1), 3,0), colorred, linethick3;
STICKLINE(HLd=1 and ref(HLd,1)=-1, HiLo,ref(MA(L,1),1), 3,0), colorred, linethick3;
STICKLINE(HLd=-1 and ref(HLd,1) = -1, HiLo,ref(HiLo,1), 3,0), colorgreen, linethick3;
STICKLINE(HLd=-1 and ref(HLd,1)=1, HiLo,ref(MA(H,3),1), 3,0), colorgreen, linethick3;
谢谢!
再请斑竹出手:
如何把最后 4句 STICKLINE 画线去掉,变成红色的连在一起,绿色的连在一起的 折线图?
偶对公式不通,请帮我写一下,先谢过了!
能具体说明一下连线的数据吗?
//STICKLINE(HLd=1 and ref(HLd,1)=1, HiLo,ref(HiLo,1), 3,0), colorred, linethick3;
//STICKLINE(HLd=1 and ref(HLd,1)=-1, HiLo,ref(MA(L,1),1), 3,0), colorred, linethick3;
partline(HLd=1,HiLo,colorred);
//STICKLINE(HLd=-1 and ref(HLd,1) = -1, HiLo,ref(HiLo,1), 3,0), colorgreen, linethick3;
//STICKLINE(HLd=-1 and ref(HLd,1)=1, HiLo,ref(MA(H,3),1), 3,0), colorgreen, linethick3;
partline(HLd=-1,HiLo,colorgreen);