Rss & SiteMap

金字塔客服中心 - 专业程序化交易软件提供商 http://www.weistock.com/bbs/

专业程序化软件提供商
共2 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:请问下面这两种写法中有没有偷价?

1楼
jason_shj 发表于:2015/2/10 15:02:19
那么该如何修改代码呢,我的主要思路是,突破上根bar的上轨,以此价格做多,突破上根bar 的下轨,以此价格做空?

如果这样写有没有偷价呢?
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;
[此贴子已经被作者于2015/2/10 15:02:47编辑过]
2楼
jinzhe 发表于:2015/2/10 15:32:54
如果觉得价格不利,推荐用market进行市价下单
共2 条记录, 每页显示 10 条, 页签: [1]


Powered By Dvbbs Version 8.3.0
Processed in 0.02344 s, 3 queries.