Order setup

Discuss, post your questions about TWSLink here.

Users who just registered, please write an email to
forum@trade-commander.de
with your username mentioned.
So we can distinguish you from bots.
Thank you
Post Reply
unconnu
Posts: 6
Joined: Tue Sep 25, 2018 4:28 am

Order setup

Post 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 ?

board_admin
Site Admin
Posts: 244
Joined: Mon Apr 24, 2017 3:24 pm

Re: Order setup

Post 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.

unconnu
Posts: 6
Joined: Tue Sep 25, 2018 4:28 am

Re: Order setup

Post 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 ?

board_admin
Site Admin
Posts: 244
Joined: Mon Apr 24, 2017 3:24 pm

Re: Order setup

Post 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.

unconnu
Posts: 6
Joined: Tue Sep 25, 2018 4:28 am

Re: Order setup

Post by unconnu »

SET_ORDERVAL (49) don't replace standard ref, it append my ref at the end of standard ref ....

board_admin
Site Admin
Posts: 244
Joined: Mon Apr 24, 2017 3:24 pm

Re: Order setup

Post 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.

Post Reply