代码上,好像几个问题,第8行的代码 ll:=ref(l,1);
这个如果是用来判断第一根线是阳线还是阴线的话,ll也冲突了,我用cc:=ref(c,1);
那 if oo<ll then buy(holding=0,1,limit,o);
if oo>ll then buyshort(holding=0,1,limit,o);
就变成
if oo<cc then buy(holding=0,1,limit,o);
if oo>cc then buyshort(holding=0,1,limit,o);
主要是后面
if holding>0 and zuig-c>20*mindiff then
begin
sell(holding>0,0,market);
buyshort(holding=0,1,market);
end
if holding<0 and c-zuid>20*mindiff then
begin
sellshort(holding<0,0,market);
buy(holding=0,1.market);
end
之后,一天还没走完,需要新的最高点,和最低点跟收盘价来比较。收盘价和最近的最高和最低比较,满足20跳就交易
请大侠,在帮我考虑考虑
[此贴子已经被作者于2011-12-20 11:13:24编辑过]