Go CTP: Flat yesterday and ping this position, log gently tell you ....

Source: Internet
Author: User

Transferred from: http://blog.csdn.net/wowotuo/article/details/43242663

CTP related documents tell us that CICC and the three major commodity exchanges , only the previous period of the distinction between the ping this position and peace yesterday . That is to say, other exchanges are not closetoday. However, there are two aspects worthy of our attention:

1, this is said to be the exchange level of the Commission, not the CTP level of the delegation, CTP level did not say that the Commission outside the previous period does not accept closetoday, or there is no closeyesterday?

2. It is worth noting that Closeyesterday seems to have been neglected?

I. Insert category for closing a consignment

Please see the type of CTP Kaiping:
Tftdcoffsetflagtype is a Kaiping flag type
public enum Enumoffsetflagtype
{
Open = 48,
Close = 49,
Forceclose = 50,
Closetoday = 51,
Closeyesterday = 52,
Forceoff = 53,
Localforceclose = 54,
}

In fact, the CTP level:

(1) If it is not the previous period, the closed position can be closed or closetoday, close or closeyesterday can be used.

(2) If it is a previous period, the Closetoday is only available, the closed position can be close or closeyesterday.
But some people think that The closetoday or Closeyesterday will be converted in the CTP backstage before being sent to the relevant exchange ., although this claim has not been recognized by official documents, it is supported by empirical data. So , the above (1) (2) is indeed available. Note that the above notation may not be the recommended specification.

Ii. types of commission on transaction returns

Of course, we also care, that the transaction returns when the water comes back, what will be the difference?

Most of the cases are:closeyesterday=> insert =>closeyesterday;closetoday=> insert =>closetoday; Of course, it seems that there are other ways of transaction return, and the transaction return information of each exchange, is not very stable, there are different time, the return information is not quite consistent situation. That is present: Closetoday =>close or Closeyesterday =>close situation.

The log data for a real test account speaks:

(Each of the following records comes from real trading data!) )

2015-02-10 11:13:22,330 [5] INFO Strategytrading.logger-=>ta505 Sell inputoffset:open = Tradeoffset:ope N
2015-02-10 10:00:20,906 [5] INFO Strategytrading.logger-=>rb1505 Buy inputoffset:closeyesterday = TradeO Ffset:closeyesterday
2015-02-10 11:13:21,909 [5] INFO Strategytrading.logger-=>ta505 Sell inputoffset:closeyesterday = TradeO Ffset:close
2015-02-10 21:59:20,021 [5] INFO Strategytrading.logger-=>ru1505 Buy closeyesterday-Closeyesterday
2015-02-10 21:59:20,114 [5] INFO Strategytrading.logger-=>ta505 Buy closeyesterday-Close
2015-02-11 01:54:26,377 [5] INFO Strategytrading.logger-= p1505 Sell Closeyesterday-Close

Law:

(1) If it is the previous period, Closeyesterday-closeyesterday. Other: Closeyesterday, Close.

(2) If it is CICC: Closetoday, Close. The others, as if they were not changed. (It needs to be confirmed!) )

Is there any other, for example, Closeyesterday=>forceclose we might as well wait for a moment. If there is, I will collect it and put it here.

Go CTP: Flat yesterday and ping this position, log gently tell you ....

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.