请稍等,我们的专家正在为您编写。
请耐心等待
runmode:0;
variable:down=0;
if holding=0 then begin
buyshort(1,1,limitr,close);
drawtext(1,high,'卖出');
end
if enterbars=1 and close<enterprice then
down:=1;
if enterbars=2 and close<ref(close,1) then
down:=down+1;
if holding<0 then begin
if down=2 and enterbars>=3 and enterbars<=5 and close>enterprice then begin
sellshort(1,holding,limitr,close);
drawtext(1,low,'反转');
end
if enterbars>=6 then
sellshort(1,holding,limitr,close);
end
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
大概的代码是这样 具体细节自己再推敲下