Re: questions about the two thread design (TWS c++ api)
Oh, so I don't need to worry about race conditions at all do I? I'm just going through TestCppClient::processMessages() over and over again? Do something based on m_state, then receive information
By
tbrown122387@...
·
#51831
·
|
Re: Avoiding time.sleep while waiting for openOrder / orderStatus callback after placeOrder
The issue you are having is an old one in programming.? You have two basic choices: polling and interrupting.? Polling means you check a status, usually in a loop with a sleep or yield call.?
By
Hunter C Payne
·
#51830
·
|
Re: strange execution price for a stop loss
I experienced this with the sim account as well, it¡¯s not accurate.
Frustrated me for awhile, but many people I have talked with said while the
sim account is good to make sure your algorithm
By
Brendan Lydon
·
#51829
·
|
Re: Avoiding time.sleep while waiting for openOrder / orderStatus callback after placeOrder
erdewit/ib_insync: Python sync/async framework for Interactive Brokers API
github.com
Check this out.
By
fran <fchiesadoc@...>
·
#51828
·
|
Avoiding time.sleep while waiting for openOrder / orderStatus callback after placeOrder
All code?examples I can see are like this:
Is there a better way of doing this? Maybe using threading.Lock() with release() in callback functions? Looking for an example. TIA.
By
Lipp F.
·
#51827
·
|
Re: strange execution price for a stop loss
Thank you for your answers.
I totally agree that the stop order is a MKT type order and offer no garanty on the price effectively executed.
But I've checked order book at this time (8:31:57 ECT), via
By
FrenchFlorent
·
#51826
·
|
Re: questions about the two thread design (TWS c++ api)
... I should add that the clientS octet which sends messages to TWS will be
in your main thread. Could be your GUI thread if you have a GUI app. Those
calls are immediate and don't have overhead.
By
David Armour
·
#51825
·
|
Re: questions about the two thread design (TWS c++ api)
The call to EReader->start() creates a thread that listens for messages
coming in from TWS. When a message comes in it is added to a queue. That is
all that thread does.
In your application you
By
David Armour
·
#51824
·
|
questions about the two thread design (TWS c++ api)
I'm trying to reason about the c++ TWS API, and according to the documentation
I'm trying to modify variables in callbacks that read information, and read them to send messages in other methods. Here
By
tbrown122387@...
·
#51823
·
|
Re: Install TWS or IB gateway on Ubuntu and ARM64 bit processor
I still don't have an ARM64 with Linux, so I cannot try this myself.
You may be able to get a little farther (and make IBGW run more stable) by making the JVM11 look more like a JVM8 to TWS/IBGW.
By
J¨¹rgen Reinold
·
#51822
·
|
Re: Install TWS or IB gateway on Ubuntu and ARM64 bit processor
Cool. Thanks. Will try it today.
By
fran <fchiesadoc@...>
·
#51821
·
|
Re: Incorrect margin in whatif order
"order.whatIf" was the issue. thank you.
By
Lipp F.
·
#51820
·
|
Re: strange execution price for a stop loss
forgot to add one more thing that is related to this case, and that is the way the price is verified. if the chart displays mid price, it does not really display the lowest bid price but just the
By
fordfrog
·
#51819
·
|
Re: strange execution price for a stop loss
i'd just add that the trigger method also determines what will happen during simulated trading. that is, the order might get triggered when ask price reaches the stop price, but for simulated trading
By
fordfrog
·
#51818
·
|
Re: Incorrect margin in whatif order
Your code sets several fields in the order object that do not exist. Most languages would complain about something like that but Python does not:
* Fields eTradeOnly? and firmQuoteOnly? have been
By
J¨¹rgen Reinold
·
#51817
·
|
Re: strange execution price for a stop loss
Results from simulated trading in the paper account will be different from trading in a live account, but the basic principles tend to be correct and quite accurate. I think what you have experienced
By
J¨¹rgen Reinold
·
#51816
·
|
Re: Install TWS or IB gateway on Ubuntu and ARM64 bit processor
I got it working on ARM64. Posted it on github, relevant details are in this commit: https://github.com/ykrasik/ib-gateway-docker-arm64/commit/99ae5b6a9b3f044c8e7edefec8749d5037f3afd2
The UI doesn't
By
ykrasik
·
#51815
·
|
Incorrect margin in whatif order
The code is like this:
and it returns Maintenance Margin: 1.7976931348623157E308:
By
Lipp F.
·
#51814
·
|
strange execution price for a stop loss
Hello
Yesterday, my bot was running in a paper trading environnement. It interacts with IB API and TWS.
The bot bot 3 contracts NQ at 09:31:45 (15:31:45 in my french local time) at 14916.25 , and
By
FrenchFlorent
·
#51813
·
|
Request for Assistance with TWS API-Based Python Trading Algorithm
Hello TWS API Group Members,
I am reaching out because I am currently working on a Python trading algorithm using the TWS API, but I lack the necessary programming skills to complete it. I am willing
By
Kendall Boone
·
#51812
·
|