作者hollejacklin (私は不器用です)
看板Trading
标题Re: [问题] MC回测取消STOP
时间Mon Jun 6 18:36:05 2011
※ 引述《hollejacklin (私は不器用です)》之铭言:
请问我在用MC做回测时
有一段语法是
if condition then begin;
buy 1 contract next bar at price stop;
sellshort 1 contract next bar at price2 stop;
end;
如果 next bar 波动太大 例如 open > price and low < price2
可是我的想法是 只要留多仓就好 不打算当天反手
那我要怎麽写才可以取消空单的触价单
谢谢各位解答
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.112.230.218
1F:推 Daway:If condition1 and marketposition=0 then begin 06/05 20:33
这个的意思是改成
if condition then begin;
buy 1 contract next bar at price stop;
If marketposition=0 then begin;
sellshort 1 contract next bar at price2 stop;
end;
end;
这样吗 可是我改完後并没有达到我想要的效果
搞不太懂 next bar 的执行流程
2F:→ hollejacklin:不懂 这要怎麽取消留在场上的触价单 06/05 22:07
3F:推 Xcd15:设条件去重设price2的价位到很低,以致於不会触发 06/06 11:48
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.112.230.218
4F:推 sdtty:这样的逻辑,绩效一定会更好,不过实际上则不一定 06/07 19:48
5F:→ hollejacklin:我的逻辑只是避免回测失真 日棒看不出是先高後低 06/07 23:33
6F:→ hollejacklin:还是先低後高 06/07 23:34