斑竹好
标准版的用户,怎么完成下面的测试?这样写有问题吗
m5:ma(c,5);
t1:=cross(c,5);//信号
t2:=hhv(h,enterbars);
if t1 then begin
buy(holding=0,1,stop,h);//突破开仓
end
if c<t2 then begin
sell(holding>0,0,stop,t2);//移动卖出
end
不知道表达的清楚不?
我想写一个能做实际测试的,上面的有问题,不清楚错在那里
可能问题表达的不清楚吧.先不管我写的内容.
这样,下面是我的条件 请帮我写个测试用的和实际能用的代码,谢谢
开仓条件:CROSS(C,MA(C,5)),为信号线,突破本K高点0.5 买入
平仓条件:自开仓起的高点落10点 平仓.
variable:hh=0;
nn:=barslast(date<>ref(date,1))+1;
zh:=hhv(h,nn);
if c>zh+0.5 then buy(1,1,thisclose);
hh:=zh;
if holding>0 and c<hh-10 then sell(1,0,thisclose);
仅供参考
谢谢了,
可是我要用实际的触发价格测试,不能用CLOSE
要真实的测试结果,用那个函数来指定价格?
你这个价格可以自己定义 buy(1,1,limitr,价格);我不清楚你指的真实价格是什么价格