exchange.SetContractType set this_week and next_week, getGetPosition is invalid

Author: niuyuhubotvs, Created: 2018-05-07 00:08:35, Updated:

The code is as follows: for (i = 0; i < 2; i++) { Exchange.SetContractType ((ContractTypes[i]); and var positions = exchange.GetPosition (); Log (('148: ', positions); I'm not sure.

The code log is as follows, i.e. the two positions are for this_week, while the holdings for this_week and next_week are expected: 2018-05-06 09:22:00 Info 148: [{ Price:23.15,Amount:3,FrozenAmount:0,Profit:0.11199735,Margin:0.12958962,MarginLevel:10,Type:0,ContractType:this_week}] 2018-05-06 09:22:00 Info 148: [{ Price:23.15,Amount:3,FrozenAmount:0,Profit:0.11199735,Margin:0.12958962,MarginLevel:10,Type:0,ContractType:this_week}]

Who in God's name can help me answer the above questions, thank you!


More

The Little DreamThe moment the code is executed, is it certain that there is a next_week hold? If there is a hold, then the contract should be available after the switch.

niuyuhubotvsThe result is this_week both times.

niuyuhubotvsIf there is no storage, shouldn't it return [], and now it returns the same data. Thank you