入场信号是这样写的:
if holding=0 then
begin
if EntryLongCond then buy(1,1,limitr,Ref(upband,1));
if EntryShortCond then buyshort(1,1,limitr,REF(dnband,1));
end;
模拟是发现在图表中有信号,但是在账户栏中无我成交?该怎么完善呢
昨天有申报发单,今天的这次没有,不知该怎么完善呢?
[此贴子已经被作者于2015/2/10 11:07:26编辑过]
下单日志里面有没有信号触发的记录?
没有信号触发的记录,说明你的这个信号是闪烁的,甚至是,行情过去后才出的
那么该如何修改代码呢,我的主要思路是,突破上根bar的上轨,以此价格做多,突破上根bar 的下轨,以此价格做空?
if holding=0 then
begin
if EntryLongCond then buy(1,1,limitr,Ref(upband,1));
if EntryShortCond then buyshort(1,1,limitr,REF(dnband,1));
end;
[此贴子已经被作者于2015/2/10 11:35:51编辑过]
如果这样写有没有偷价呢? upband:=ma(c,20)+2*std(c,20);
dnband:=ma(c,20)-2*std(c,20); if holding=0 then
begin
if EntryLongCond then buy(1,1,limitr,upband);
if EntryShortCond then buyshort(1,1,limitr,dnband);
end;
和下面比较哪种可以表示我突破上下轨入场的思路呢?
upband:=ma(c,20)+2*std(c,20);
dnband:=ma(c,20)-2*std(c,20);
if holding=0 then
begin
if EntryLongCond then buy(1,1,limitr,Ref(upband,1));
if EntryShortCond then buyshort(1,1,limitr,REF(dnband,1));
end;
你贴一段日志,看看触发时的日志里面是怎么记录的
先在 交易 下单设置 程式化交易里面 勾选上记录下单日志