学习资料基本都看过了,大概的情况也了解一些,还是编个简单的后台试试,这样有助于快速学习,希望各位多多帮忙
思路:委托买价挂多买一手,并记住自己的成本;成交后,在挂自己成本+1的价位卖。就实现这个思路。
variabel:cbbj=0,gdbj=0;//记住买入成本 记住挂单状态
if holding>0 and gdbj<>2 then begn//防止重复挂卖
TSELL(holding>0,0,LMT,cbbj+1);
gdbj=2;
end
if holding=0 then begn
if gdbj<>1 then begin//防止重复挂买
cbbj:=DYNAINFO(20);
TBUY(holding=0,1, LMT,cbbj);
gdbj=1;
end
end
globalvariable:cbbj:=0,gdbj:=0;//记住买入成本 记住挂单状态
if tholding>0 and gdbj<>2 then begn//防止重复挂卖
TSELL(tholding>0,0,LMT,cbbj+1);
gdbj:=2;
end
if tholding=0 then begn
if gdbj<>1 then begin//防止重复挂买
cbbj:=DYNAINFO(20);
TBUY(tholding=0,1, LMT,cbbj);
gdbj:=1;
end
end