 
等级: 超级版主
- 注册:
- 2021-5-18
- 曾用名:
|
hh:valuewhen(todaybar=5,hhv(high,5));
ll:valuewhen(todaybar=5,llv(low,5));
if todaybar>5 and holding<=0 and close>hh then
begin
sellshort(1,holding,marketr);
buy(1,1,marketr);
END
if todaybar>5 and holding>=0 and close<ll then
begin
sell(1,holding,marketr);
buyshort(1,1,marketr);
END
if close<ref(low,enterbars+1) and holding>0 then sell(1,holding,marketr);
if close>ref(high,enterbars+1) and holding<0 then sellshort(1,holding,marketr);
if cross(ma(c,5),ma(c,10)) and holding>0 then sell(1,holding,marketr);
if cross(ma(c,10),ma(c,5)) and holding<0 then sellshort(1,holding,marketr); |
|