Page 1 of 1

Order setup

Posted: Thu Sep 27, 2018 3:58 am
by unconnu
When I use PLACE_ORDER Twslink2 use defaut setup for order ref.

How i can change this default setup without use SET_ORDER_VAL ?

where can i find informations about Twslink2.xml file ?

Re: Order setup

Posted: Thu Sep 27, 2018 10:27 am
by board_admin
Without SET_ORDER_VAL this is not possible.
Just call PLACE_ORDER with transmit flag=-1 (so it goes not to IB).
Then use SET_ORDER_VAL to set the ref with transmit flag=1.

There is no information about twslink.xml. Normally no need to change it and also some parts may not have an impact at all.

Re: Order setup

Posted: Thu Sep 27, 2018 1:05 pm
by unconnu
thank You for your reply,

when i sent a simple PLACE_ORDER this order have this ref ""nref=#~tc#;0=10;1=20180924 14:13:33:189d;2=1"" in my trade log and on my broker side,

Why ?

Re: Order setup

Posted: Thu Sep 27, 2018 1:33 pm
by board_admin
It is the standard ref. It also stores the uid of an order which is useful to recover order.
Also you know it was placed by TWSLink.

Re: Order setup

Posted: Thu Sep 27, 2018 3:52 pm
by unconnu
SET_ORDERVAL (49) don't replace standard ref, it append my ref at the end of standard ref ....

Re: Order setup

Posted: Fri Sep 28, 2018 7:29 pm
by board_admin
Yes,
custom ref appened to standard ref. The ref is used to store uid. The uid is used to restore an order on restart / reconnect. TWSLink wont rely on permid here.