每天就一笔交易
只多空加起来一笔还是多空各一笔
看一分钟K线.下午14:00后,如果突破了当天的最高点 就做多,(有夜盘的 从晚上开盘到第二天上午都算当天) 一直留到收盘最后一分钟前(14:59)平仓.止损点数为开仓价格的0.5%.比如4000开仓做多,止损就是3980. 每天就一笔交易,做空相反.
variable:n=0;
if time>=180000 and time<185900 and h>ref(hhv(h,todaybar),1) and holding=0 and n=0 then begin
buy(holding=0,1,marketr);
n:=1;
end
if time>=180000 and time<185900 and l<ref(llv(l,todaybar),1) and holding=0 and n=0 then begin
buyshort(holding=0,1,marketr);
n:=1;
end
if time>=180000 and time<185900 and holding>0 and c<=enterprice*(1-0.05) then sell(1,0,marketr);
if time>=180000 and time<185900 and holding<0 and c>=enterprice*(1+0.05) then sellshort(1,0,marketr);
if time=190000 then begin
sell(1,0,marketr);
sellshort(1,0,marketr);
n:=0;
end
测试的是什么品种?
当前的最后一根k线时间是15:00还是19:00?