请问一下
5分钟图上的策略
1、今天开盘价比昨日收盘价低就做空,高就做多;
2、止损止盈都是1个百分点;
3、每天只做一单;
请问怎么编写
谢谢!
variable:bj=0;
cc:=ref(close,todaybar);
if todaybar=1 and holding=0 and bj=0 and o>cc then begin
buy(1,1,marketr);
bj:=1;
end
if todaybar=1 and holding=0 and bj=0 and o<cc then begin
buyshort(1,1,marketr);
bj:=1;
end
if holding>0 and c>enterprice*1.01 and enterbars>0 then sell(1,0,marketr);
if holding>0 and c<enterprice*0.99 and enterbars>0 then sell(1,0,marketr);
if holding<0 and c>enterprice*1.01 and enterbars>0 then sellshort(1,0,marketr);
if holding<0 and c<enterprice*0.99 and enterbars>0 then sellshort(1,0,marketr);
if time =closetime(0) then bj:=0;
谢谢!
问一下,
buy(1,1,marketr)中,第二个1是表示1手吧?那第一个1什么意思?
if time=closetime(0) then begin
sell(1,0,marketr);
sellshort(1,0,marketr);
end