周期高点:REF(HHV(H,X1),1);
周期低点:REF(LLV(L,X2),1);
平空开多:=HIGH>=周期高点;
平多开空:=LOW<=周期低点;
BUYSHORT_BUY(平空开多,LOW);
SELL_SELLSHORT(平多开空,HIGH);
AUTOFILTER;
请老师把通达信公式改成金字塔策略。
这个不是通达信的。
不过看字面意思就是2个反手。改下下单语句就行了。
周期高点:REF(HHV(H,X1),1);
周期低点:REF(LLV(L,X2),1);
平空开多:=HIGH>=周期高点;
平多开空:=LOW<=周期低点;
if 平空开多 then
begin
sellshort(1,holding,market);
buy(holding=0,1,market);
end
if 平多开空 then
begin
sell(1,holding,market);
buyshort(holding=0,1,market);
end