突破首根k线最高点开多仓3手,突破首根k线最低点开空仓3手。
止盈:1/3止盈33点,止盈后剩下2手设回调止损10点(实质盈利10点);
1/3止盈44点,止盈后剩下1/3设回调一半止损,或者到收盘平仓。
首根k线 指的是当日的第一根k线?
1/3止盈33点的意思是盈利33点后平掉1/3手持仓?
variable:hh=0;
variable:ll=100000;
n:=3;
h_1:valuewhen(todaybar=1,high);
l_1:valuewhen(todaybar=1,low);
if h>h_1 then begin
buy(holding=0,3,thisclose);
hh:=h;
end
if h>hh then hh:=h;
if l<l_1 then begin
buyshort(holding=0,3,thisclose);
ll:=l;
end
if l<ll then ll:=l;
if c-enterprice>33*mindiff then sell(holding>0,n/3,thisclose);
if enterprice-c>33*mindiff then sellshort(holding<0,n/3,thisclose);
if hh-h>10*mindiff and close-enterprice>10*mindiff then sell(holding>0,n*2/3,thisclose);
if l-ll>10*mindiff and enterprice-close>10*mindiff then sellshort(holding<0,n*2/3,thisclose);
if time=closetime(0) then begin
sellshort(1,0,thisclose);
sell(1,0,thisclose);
end