这个真头疼啊
如果你第一次接触金字塔 我建议你先自学下指标 然后再学习过程中遇到问题再来提问会进步比较快
直接贴思路让转成代码 而且有很多东西其实是最基础的东西
tj1:=ref(close,1)>ref(high,2);
tj2:=ref(close,1)<ref(low,2);
tj3:=ref(close,1)>ref(low,2) and ref(close,1)<ref(high,2);
hh:=max(ref(high,1),ref(high,2));
ll:=min(ref(low,1),ref(low,2));
tj4:=tj3 and close>hh;
tj5:=tj3 and close<ll;
tj6:=close>=ll and close<=hh;
hhh:=max(hh,high);
lll:=min(ll,low);
tj7:=tj6 and close<hhh;
tj8:=tj6 and close>lll;
red:=tj1 or tj4 or tj7;
green:=tj2 or tj5 or tj8;
stickline(red,c,o,8,0),color0000aa;
stickline(red,c,o,5,0),color0000cc;
stickline(red,c,o,3,0),color0000dd;
stickline(red,h,l,0,0),color0000ff;
stickline(green,c,o,8,0),color998855;
stickline(green,c,o,5,0),colorbbaa77;
stickline(green,c,o,3,0),colorddcc99;
stickline(green,l,h,0,0),colorffeebb;
variable:x=1,y=2;
if 条件成立 then begin
DRAWTEXT(CLOSE/OPEN>1.01,LOW,'标记1');
end
if 空条件成立 then begin
DRAWTEXT(CLOSE/OPEN>1.01,LOW,'卖出');
x=BARPOS;
end
now:=BARPOS;
if now-x>=3 AND now-x<=5 AND 其后2根K线如期发展的条件成立 then begin
DRAWTEXT(CLOSE/OPEN>1.01,LOW,'反转');
end
大概的代码是这样 具体细节自己再推敲下
谢谢!!!