Search found 244 matches

by board_admin
Sun Jun 24, 2018 2:15 pm
Forum: Twslink - universal Interactive Brokers API plugin
Topic: how to setup a futures option vertical spread contract?
Replies: 13
Views: 35770

Re: how to setup a futures option vertical spread contract?

Honestly, i never tested combo orders and also i am not familar with combo orders. For details of TWSLink functions, use the help file please file:///C:/Program%20Files%20(x86)/trade-commander/twslink2/Documentation/html/tbl_orderval.html From what i see in the code, a combo order is created in mult...
by board_admin
Sat Jun 23, 2018 1:02 pm
Forum: Twslink - universal Interactive Brokers API plugin
Topic: how to setup a futures option vertical spread contract?
Replies: 13
Views: 35770

Re: how to setup a futures option vertical spread contract?

Hello,
never did this before.

The general approach is: Pick the contract in TWS. Right click on contract, get information / description or details.
Use the information provided there for the register contract functions.
by board_admin
Thu May 10, 2018 12:41 pm
Forum: Twslink - universal Interactive Brokers API plugin
Topic: How call Average Price of an Open Position in TWS-Link?
Replies: 1
Views: 18462

Re: How call Average Price of an Open Position in TWS-Link?

The average price is a portfolio value.

(open help file from browser:)

Code: Select all

file:///C:/Program%20Files%20(x86)/trade-commander/twslink2/Documentation/html/fct_GET_PORTFOLIO_VAL.html

GET_PORFOLIO_VAL(uidcontract,5,"")
by board_admin
Thu May 03, 2018 12:10 pm
Forum: Twslink - universal Interactive Brokers API plugin
Topic: WAITDLL
Replies: 6
Views: 23972

Re: WAITDLL

WAIT_FOR_FILLED should be good for this. It breaks when an order been rejected. It returns 1, when filled. 0 when timeout. -2 when order rejected or cancelled, -1 when initial or inactive (can't reach filled state). Are you sure you get a timeout when you place a reverse order which violates margin ?
by board_admin
Wed May 02, 2018 10:49 pm
Forum: Twslink - universal Interactive Brokers API plugin
Topic: WAITDLL
Replies: 6
Views: 23972

Re: WAITDLL

The time will be proper etc. It just sets the thread to idle. The script pauses script execution the denoted time at this point. Thats all. I have no TradeStation and also do not use MultiCharts this time so i can't make a definite statements how WAITDLL exactly affects your script. But i guess, whe...
by board_admin
Wed May 02, 2018 8:02 pm
Forum: Twslink - universal Interactive Brokers API plugin
Topic: WAITDLL
Replies: 6
Views: 23972

Re: WAITDLL

The calling thread is suspended, goes into idle state.
So the calling script stops. If another script runs in the same thread, this stops as well.
by board_admin
Fri Apr 27, 2018 2:13 pm
Forum: Twslink - universal Interactive Brokers API plugin
Topic: New tool in the town
Replies: 0
Views: 31578

New tool in the town

Hello TWSLink users, just want to point to a new tool which is coming soon. It is called IBPlugin and it has already its own forum. It is a more reduced but advanced version of TWSLink. It focuses on MetaTrader. For more information just read the 1st post in its forum: https://trade-commander.com/tc...
by board_admin
Fri Apr 27, 2018 2:05 pm
Forum: IBPlugin
Topic: What is IBPlugin
Replies: 2
Views: 14640

What is IBPlugin

IBPlugin is further development of TWSLink. It is focused for the useage with MetaTrader. However, as it is a DLL, you can use it everywhere on Windows which supports DLL, e.g. Trade Station, Excel or C++ applications or make wrapper for Perl, Python etc. In comparison to TWSLink it has a reduced in...
by board_admin
Fri Apr 27, 2018 1:15 pm
Forum: Twslink - universal Interactive Brokers API plugin
Topic: Calling Get_Acc_Val & Get_Postions functions 50 times in a row caused my PC to overheat and shut down
Replies: 9
Views: 15366

Re: Calling Get_Acc_Val & Get_Postions functions 50 times in a row caused my PC to overheat and shut down

You find the settings file in the x86 programs folder on x64 machines or in the programs folder on x86 machines: C:\Program Files (x86)\trade-commander\twslink2\xml\twslink.xml Open the xml in an editor and search the line below and set the loglevel 4 behind the "v". <dllll ttl="DLL Loglevel" v="4" ...
by board_admin
Wed Apr 25, 2018 11:26 am
Forum: Twslink - universal Interactive Brokers API plugin
Topic: Calling Get_Acc_Val & Get_Postions functions 50 times in a row caused my PC to overheat and shut down
Replies: 9
Views: 15366

Re: Calling Get_Acc_Val & Get_Postions functions 50 times in a row caused my PC to overheat and shut down

Thank you for update. Just for clarification. A WAITDLL call puts a thread into an idle state. It locks the calling thread for this time. It is the opposite of what could "overheat" an CPU. A high loglevel can raise CPU load. In particular loglevel 0. Because this means full logging and also it prod...
by board_admin
Wed Apr 18, 2018 10:24 am
Forum: Twslink - universal Interactive Brokers API plugin
Topic: Calling Get_Acc_Val & Get_Postions functions 50 times in a row caused my PC to overheat and shut down
Replies: 9
Views: 15366

Re: Calling Get_Acc_Val & Get_Postions functions 50 times in a row caused my PC to overheat and shut down

WAITDLL makes a stop of the calling thread for the specified time. The thread is going into idle state. No CPU load. It can cause a TradeStation lock (freeze) for the time of sleep, presumed it is called in all threads, but for sure not a machine lock. WAITDLL does nothing else than calling a Window...
by board_admin
Tue Apr 17, 2018 11:59 am
Forum: Twslink - universal Interactive Brokers API plugin
Topic: Calling Get_Acc_Val & Get_Postions functions 50 times in a row caused my PC to overheat and shut down
Replies: 9
Views: 15366

Re: Calling Get_Acc_Val & Get_Postions functions 50 times in a row caused my PC to overheat and shut down

Just made a test. Calling 100 times GET_ACC_VAL took 78 milliseconds on my virtual machine (6 cores, 16 GB) . There is absolutely no bottleneck and no need to call a wait function between function calls. You can check this also when loading the script "account- and portfolio data" in the batchtester...
by board_admin
Tue Apr 17, 2018 11:27 am
Forum: Twslink - universal Interactive Brokers API plugin
Topic: Calling Get_Acc_Val & Get_Postions functions 50 times in a row caused my PC to overheat and shut down
Replies: 9
Views: 15366

Re: Calling Get_Acc_Val & Get_Postions functions 50 times in a row caused my PC to overheat and shut down

Sorry, i can't believe TWSLink causes corrupted harddrives. Please find another cause for this and allow me a comment: Running a trading machine on a laptop is a bit careless. Generally TWSLink spreads work into threads. Having multiple cores is an advantage, memory as well. If you have a millisecon...
by board_admin
Tue Apr 17, 2018 11:21 am
Forum: Twslink - universal Interactive Brokers API plugin
Topic: Does TWSLink work fine on x64 OS machines?
Replies: 1
Views: 8831

Re: Does TWSLink work fine on x64 OS machines?

TWSLink works on both. On a 64 bit machine, you get both versions installed. So processes can - depending on platform -
pick the right version: from system32 -> 64 bit version, from syswow64 -> 32 bit version.
by board_admin
Tue Apr 10, 2018 3:25 pm
Forum: Twslink - universal Interactive Brokers API plugin
Topic: Best way to confirm buying power before issuing order??
Replies: 18
Views: 69967

Re: Best way to confirm buying power before issuing order??

If you say reversals, so you like to turn a position in one step, you may split this into 2 steps: One close, one open.
But perhaps i have no exact picture of the problem.

If you say "IB hasn't reported back available cash". Normally this should happen very quickly after each execution.
by board_admin
Tue Apr 10, 2018 2:43 pm
Forum: Twslink - universal Interactive Brokers API plugin
Topic: Best way to confirm buying power before issuing order??
Replies: 18
Views: 69967

Re: Best way to confirm buying power before issuing order??

The problem is that i am not able to test this, because i have no cash accounts and also the public demo is always a margin account. With a cash account, isnt it much easier to make all calculations on your own before placing an oder? But, if short trades get rejected even you have the balance to do...
by board_admin
Tue Apr 03, 2018 12:47 pm
Forum: Twslink - universal Interactive Brokers API plugin
Topic: Set event handler callback for MetaTrader 5
Replies: 18
Views: 26146

Re: Set event handler callback for MetaTrader 5

Just let me mention this: It is not tested on Linux/MacOS/Wine.
So i am sorry, can't provide support her.

The error below looks like TWSLink is somehow still in use
by board_admin
Fri Mar 30, 2018 2:44 pm
Forum: Twslink - universal Interactive Brokers API plugin
Topic: TWS-Link "GET_EXCHANGE_RATE" function not working??
Replies: 1
Views: 8405

Re: TWS-Link "GET_EXCHANGE_RATE" function not working??

The exchange rates are part of account information when you have cash positions in non base currencies. So you get only exchange rates among currencies which are listed in your account . Also, in order receive exchange rates at all, you need full account value subscriptions. So not off and not summa...
by board_admin
Fri Mar 30, 2018 2:40 pm
Forum: Twslink - universal Interactive Brokers API plugin
Topic: Set event handler callback for MetaTrader 5
Replies: 18
Views: 26146

Re: Set event handler callback for MetaTrader 5

Hello,
please download and install update:

http://trade-commander.com/?ddownload=281

There is in fact a problem. Please let me know, if you get values now.
by board_admin
Mon Mar 26, 2018 1:14 pm
Forum: Twslink - universal Interactive Brokers API plugin
Topic: Set event handler callback for MetaTrader 5
Replies: 18
Views: 26146

Re: Set event handler callback for MetaTrader 5

TWSLink logs. Should be located in

Code: Select all

C:\trade-commander\twslink2\log