How to prevent the pit that has been stepped on, and keep sending out open orders after the opening signal appears?

1. First, OrderRef is a field provided by the CTP background to the client to identify an order. The client can uniquely determine an order through the keyword group (FrontID, SessionID, OrderRef). The client does not fill the OrderRef field when the order is issued. CTP The background will automatically assign a value to the OrderRef field of the order and return it to the client.

2. OrderActionRef is similar to OrderRef in that it is provided to the client to identify a cancellation order. The data type of OrderRef is a character array, which must be Arabic numeric characters. The value of OrderRef (OrderActionRef) must ensure that the OrderRef (OrderActionRef) value of the report (withdrawal) order sent after the same session is greater than the previous maximum value, and special attention needs to be paid when developing multi-threaded clients.

3. In order to prevent the continuous sending of insurance policies, OrderRef in the CTP protocol can prevent the trading system from continuously sending orders after the opening signal appears, which leads to the wrong opening of the customer, but if the trading system sends a single order After that, OrderRef +1 will be automatically added so that the trading system can open new orders normally when the next signal appears.

Published 19 original articles · Likes0 · Visits 383

Guess you like

Origin blog.csdn.net/qinchun/article/details/104763467