- 精华
- 0
- 在线时间
- 2 小时
- UID
- 189043
- 积分
- 2
- 帖子
- 1
- 阅读权限
- 10
- 注册时间
- 2014-6-20
- 最后登录
- 1970-1-1
- 精华
- 0
- UID
- 189043
- 积分
- 2
- 帖子
- 1
- 主题
- 1
- 阅读权限
- 10
- 注册时间
- 2014-6-20
- 最后登录
- 1970-1-1
|
本帖最后由 nkwindforce 于 2014-7-11 23:37 编辑
为什么套利历史回测时,TB会给我把仓平掉,参见2014-06-24 14:34:00分的log。我的程序并没有发出平仓指令,模拟账户资金也很充裕,我都是止盈止损后才开仓的,会是什么原因呢?
2014-06-24 13:45:00 Close=3054, 3070 Diff=-16 Txncode=0 Leg=0, 0 BarsSinceEntry=0 MarketPosition=0, 0 CurrentCapital=10000000 UsedMargin=0
2014-06-24 13:46:00 Close=3055, 3070 Diff=-15 Txncode=0 Leg=0, 0 BarsSinceEntry=0 MarketPosition=0, 0 CurrentCapital=10000000 UsedMargin=0
2014-06-24 13:46:00 开仓A:卖Data0.Close = 3055 买 Data1.Close = 3070 Diff = -15 DiffMode = -16
2014-06-24 13:47:00 Close=3053, 3068 Diff=-15 Txncode=2 Leg=1, 0 BarsSinceEntry=1 MarketPosition=-1, 1 CurrentCapital=9996938.5 UsedMargin=3061.5
2014-06-24 13:48:00 Close=3053, 3068 Diff=-15 Txncode=2 Leg=1, 0 BarsSinceEntry=2 MarketPosition=-1, 1 CurrentCapital=9996939.5 UsedMargin=3060.5
2014-06-24 13:49:00 Close=3054, 3068 Diff=-14 Txncode=2 Leg=1, 0 BarsSinceEntry=3 MarketPosition=-1, 1 CurrentCapital=9996950 UsedMargin=3060
2014-06-24 13:50:00 Close=3054, 3070 Diff=-16 Txncode=2 Leg=1, 0 BarsSinceEntry=4 MarketPosition=-1, 1 CurrentCapital=9996929 UsedMargin=3061
2014-06-24 13:50:00 止盈A: 买Data0.Close = 3054 卖 Data1.Close = 3070 Diff = -16 MyEntryPrice = -15
2014-06-24 13:51:00 Close=3054, 3069 Diff=-15 Txncode=5 Leg=0, 1 BarsSinceEntry=0 MarketPosition=0, 0 CurrentCapital=10000003.8755 UsedMargin=0
2014-06-24 13:51:00 开仓A:卖Data0.Close = 3054 买 Data1.Close = 3069 Diff = -15 DiffMode = -16
2014-06-24 13:52:00 Close=3054, 3070 Diff=-16 Txncode=2 Leg=1, 0 BarsSinceEntry=1 MarketPosition=-1, 1 CurrentCapital=9996942.3755 UsedMargin=3061.5
2014-06-24 13:52:00 止盈A: 买Data0.Close = 3054 卖 Data1.Close = 3070 Diff = -16 MyEntryPrice = -15
2014-06-24 13:53:00 Close=3053, 3069 Diff=-16 Txncode=5 Leg=0, 1 BarsSinceEntry=0 MarketPosition=0, 0 CurrentCapital=10000007.752 UsedMargin=0
2014-06-24 13:54:00 Close=3053, 3070 Diff=-17 Txncode=5 Leg=0, 1 BarsSinceEntry=0 MarketPosition=0, 0 CurrentCapital=10000007.752 UsedMargin=0
2014-06-24 13:54:00 开仓B: 买Data0.Close = 3053 卖 Data1.Close = 3070 Diff = -17 DiffMode = -16
2014-06-24 13:55:00 Close=3053, 3069 Diff=-16 Txncode=2 Leg=0, 1 BarsSinceEntry=1 MarketPosition=1, -1 CurrentCapital=9996966.252 UsedMargin=3061.5
2014-06-24 13:55:00 止盈B: 卖Data0.Close = 3053 买 Data1.Close = 3069 Diff = -16 MyEntryPrice = -17
2014-06-24 13:56:00 Close=3056, 3072 Diff=-16 Txncode=5 Leg=1, 0 BarsSinceEntry=0 MarketPosition=0, 0 CurrentCapital=10000011.6295 UsedMargin=0
2014-06-24 13:57:00 Close=3056, 3071 Diff=-15 Txncode=5 Leg=1, 0 BarsSinceEntry=0 MarketPosition=0, 0 CurrentCapital=10000011.6295 UsedMargin=0
2014-06-24 13:57:00 开仓A:卖Data0.Close = 3056 买 Data1.Close = 3071 Diff = -15 DiffMode = -16
2014-06-24 13:58:00 Close=3056, 3071 Diff=-15 Txncode=2 Leg=1, 0 BarsSinceEntry=1 MarketPosition=-1, 1 CurrentCapital=9996958.6295 UsedMargin=3063
2014-06-24 13:59:00 Close=3056, 3071 Diff=-15 Txncode=2 Leg=1, 0 BarsSinceEntry=2 MarketPosition=-1, 1 CurrentCapital=9996958.6295 UsedMargin=3063
2014-06-24 14:00:00 Close=3057, 3071 Diff=-14 Txncode=2 Leg=1, 0 BarsSinceEntry=3 MarketPosition=-1, 1 CurrentCapital=9996947.1295 UsedMargin=3064.5
2014-06-24 14:01:00 Close=3056, 3070 Diff=-14 Txncode=2 Leg=1, 0 BarsSinceEntry=4 MarketPosition=-1, 1 CurrentCapital=9996937.6295 UsedMargin=3064
2014-06-24 14:02:00 Close=3056, 3071 Diff=-15 Txncode=2 Leg=1, 0 BarsSinceEntry=5 MarketPosition=-1, 1 CurrentCapital=9996948.1295 UsedMargin=3063.5
2014-06-24 14:03:00 Close=3056, 3071 Diff=-15 Txncode=2 Leg=1, 0 BarsSinceEntry=6 MarketPosition=-1, 1 CurrentCapital=9996948.1295 UsedMargin=3063.5
2014-06-24 14:04:00 Close=3055, 3070 Diff=-15 Txncode=2 Leg=1, 0 BarsSinceEntry=7 MarketPosition=-1, 1 CurrentCapital=9996938.6295 UsedMargin=3063
2014-06-24 14:05:00 Close=3055, 3069 Diff=-14 Txncode=2 Leg=1, 0 BarsSinceEntry=8 MarketPosition=-1, 1 CurrentCapital=9996949.1295 UsedMargin=3062.5
2014-06-24 14:06:00 Close=3056, 3069 Diff=-13 Txncode=2 Leg=1, 0 BarsSinceEntry=9 MarketPosition=-1, 1 CurrentCapital=9996939.6295 UsedMargin=3062
2014-06-24 14:07:00 Close=3056, 3071 Diff=-15 Txncode=2 Leg=1, 0 BarsSinceEntry=10 MarketPosition=-1, 1 CurrentCapital=9996938.6295 UsedMargin=3063
2014-06-24 14:08:00 Close=3056, 3071 Diff=-15 Txncode=2 Leg=1, 0 BarsSinceEntry=11 MarketPosition=-1, 1 CurrentCapital=9996948.1295 UsedMargin=3063.5
2014-06-24 14:09:00 Close=3056, 3071 Diff=-15 Txncode=2 Leg=1, 0 BarsSinceEntry=12 MarketPosition=-1, 1 CurrentCapital=9996948.1295 UsedMargin=3063.5
2014-06-24 14:10:00 Close=3055, 3070 Diff=-15 Txncode=2 Leg=1, 0 BarsSinceEntry=13 MarketPosition=-1, 1 CurrentCapital=9996948.1295 UsedMargin=3063.5
2014-06-24 14:11:00 Close=3055, 3071 Diff=-16 Txncode=2 Leg=1, 0 BarsSinceEntry=14 MarketPosition=-1, 1 CurrentCapital=9996958.6295 UsedMargin=3063
2014-06-24 14:11:00 止盈A: 买Data0.Close = 3055 卖 Data1.Close = 3071 Diff = -16 MyEntryPrice = -15
2014-06-24 14:12:00 Close=3054, 3070 Diff=-16 Txncode=5 Leg=0, 1 BarsSinceEntry=0 MarketPosition=0, 0 CurrentCapital=10000015.503 UsedMargin=0
2014-06-24 14:13:00 Close=3054, 3070 Diff=-16 Txncode=5 Leg=0, 1 BarsSinceEntry=0 MarketPosition=0, 0 CurrentCapital=10000015.503 UsedMargin=0
2014-06-24 14:14:00 Close=3054, 3070 Diff=-16 Txncode=5 Leg=0, 1 BarsSinceEntry=0 MarketPosition=0, 0 CurrentCapital=10000015.503 UsedMargin=0
2014-06-24 14:15:00 Close=3054, 3070 Diff=-16 Txncode=5 Leg=0, 1 BarsSinceEntry=0 MarketPosition=0, 0 CurrentCapital=10000015.503 UsedMargin=0
2014-06-24 14:16:00 Close=3054, 3070 Diff=-16 Txncode=5 Leg=0, 1 BarsSinceEntry=0 MarketPosition=0, 0 CurrentCapital=10000015.503 UsedMargin=0
2014-06-24 14:17:00 Close=3055, 3070 Diff=-15 Txncode=5 Leg=0, 1 BarsSinceEntry=0 MarketPosition=0, 0 CurrentCapital=10000015.503 UsedMargin=0
2014-06-24 14:17:00 开仓A:卖Data0.Close = 3055 买 Data1.Close = 3070 Diff = -15 DiffMode = -16
2014-06-24 14:18:00 Close=3055, 3071 Diff=-16 Txncode=2 Leg=1, 0 BarsSinceEntry=1 MarketPosition=-1, 1 CurrentCapital=9996963.503 UsedMargin=3062
2014-06-24 14:18:00 止盈A: 买Data0.Close = 3055 卖 Data1.Close = 3071 Diff = -16 MyEntryPrice = -15
2014-06-24 14:19:00 Close=3056, 3071 Diff=-15 Txncode=5 Leg=0, 1 BarsSinceEntry=0 MarketPosition=0, 0 CurrentCapital=10000019.3775 UsedMargin=0
2014-06-24 14:19:00 开仓A:卖Data0.Close = 3056 买 Data1.Close = 3071 Diff = -15 DiffMode = -16
2014-06-24 14:20:00 Close=3059, 3074 Diff=-15 Txncode=2 Leg=1, 0 BarsSinceEntry=1 MarketPosition=-1, 1 CurrentCapital=9996945.3775 UsedMargin=3064
2014-06-24 14:21:00 Close=3057, 3072 Diff=-15 Txncode=2 Leg=1, 0 BarsSinceEntry=2 MarketPosition=-1, 1 CurrentCapital=9996952.8775 UsedMargin=3066.5
2014-06-24 14:22:00 Close=3058, 3073 Diff=-15 Txncode=2 Leg=1, 0 BarsSinceEntry=3 MarketPosition=-1, 1 CurrentCapital=9996954.8775 UsedMargin=3064.5
2014-06-24 14:23:00 Close=3057, 3072 Diff=-15 Txncode=2 Leg=1, 0 BarsSinceEntry=4 MarketPosition=-1, 1 CurrentCapital=9996953.8775 UsedMargin=3065.5
2014-06-24 14:24:00 Close=3057, 3072 Diff=-15 Txncode=2 Leg=1, 0 BarsSinceEntry=5 MarketPosition=-1, 1 CurrentCapital=9996944.3775 UsedMargin=3065
2014-06-24 14:25:00 Close=3057, 3072 Diff=-15 Txncode=2 Leg=1, 0 BarsSinceEntry=6 MarketPosition=-1, 1 CurrentCapital=9996954.8775 UsedMargin=3064.5
2014-06-24 14:26:00 Close=3058, 3071 Diff=-13 Txncode=2 Leg=1, 0 BarsSinceEntry=7 MarketPosition=-1, 1 CurrentCapital=9996954.8775 UsedMargin=3064.5
2014-06-24 14:27:00 Close=3057, 3072 Diff=-15 Txncode=2 Leg=1, 0 BarsSinceEntry=8 MarketPosition=-1, 1 CurrentCapital=9996934.8775 UsedMargin=3064.5
2014-06-24 14:28:00 Close=3057, 3071 Diff=-14 Txncode=2 Leg=1, 0 BarsSinceEntry=9 MarketPosition=-1, 1 CurrentCapital=9996955.8775 UsedMargin=3063.5
2014-06-24 14:29:00 Close=3057, 3071 Diff=-14 Txncode=2 Leg=1, 0 BarsSinceEntry=10 MarketPosition=-1, 1 CurrentCapital=9996946.3775 UsedMargin=3063
2014-06-24 14:30:00 Close=3058, 3072 Diff=-14 Txncode=2 Leg=1, 0 BarsSinceEntry=11 MarketPosition=-1, 1 CurrentCapital=9996945.3775 UsedMargin=3064
2014-06-24 14:31:00 Close=3061, 3073 Diff=-12 Txncode=2 Leg=1, 0 BarsSinceEntry=12 MarketPosition=-1, 1 CurrentCapital=9996944.3775 UsedMargin=3065
2014-06-24 14:32:00 Close=3061, 3074 Diff=-13 Txncode=2 Leg=1, 0 BarsSinceEntry=13 MarketPosition=-1, 1 CurrentCapital=9996922.3775 UsedMargin=3067
2014-06-24 14:33:00 Close=3063, 3074 Diff=-11 Txncode=2 Leg=1, 0 BarsSinceEntry=14 MarketPosition=-1, 1 CurrentCapital=9996921.3775 UsedMargin=3068
2014-06-24 14:34:00 Close=3064, 3075 Diff=-11 Txncode=2 Leg=1, 0 BarsSinceEntry=0 MarketPosition=0, 0 CurrentCapital=10000000 UsedMargin=0
2014-06-24 14:35:00 Close=3064, 3076 Diff=-12 Txncode=2 Leg=1, 0 BarsSinceEntry=0 MarketPosition=0, 0 CurrentCapital=10000000 UsedMargin=0
2014-06-24 14:36:00 Close=3063, 3075 Diff=-12 Txncode=2 Leg=1, 0 BarsSinceEntry=0 MarketPosition=0, 0 CurrentCapital=10000000 UsedMargin=0
2014-06-24 14:37:00 Close=3062, 3074 Diff=-12 Txncode=2 Leg=1, 0 BarsSinceEntry=0 MarketPosition=0, 0 CurrentCapital=10000000 UsedMargin=0 |
|