¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io
Date

Re: ib gateway 981 cannot auto restart by default jts.ini

 

I get it, thank you so much


After loss and regain of internet connection - login credentials are required

Erez Kaplan
 

Hi,

?

After I?loss and regain internet connection, the TWS login credentials are required. (see photo)

Just to be clear:

1) This is NOT the weekly Sunday issue as discussed in the past. ( simulated by disconnecting the Internet on Tuesday, re enetring credentials every time, several times)

2) Daily restart with? ¡°Auto restart¡± works fine.



Re: best trading platform for IB

 

I can recommend ProRealTime for that type of chart work.? It will snap the beginning of the line to the price of the candle (or wick).
Screen Shot 2021-08-02 at 9.15.17 PM.png
It uses IBKR as the backend for trading execution.? You do not have to have IB TWS nor Gateway open.


Le?lun. 2 ao?t 2021 ¨¤?20:39, conrad modica via <modica06=[email protected]> a ¨¦crit?:


Thanks Nick. Have you tried other platforms?
On Monday, 2 August 2021, 02:29:04 pm GMT-4, Nick <news1000@...> wrote:


NinjaTrader is free for charting so you can give that a try for no risk. If you want to place orders from NinjaTrader you would need a paid version.


On 8/2/2021 2:07 PM, conrad modica via wrote:
To All:

I'm wondering if anyone can shed light on sharing their experiences with what they think is the best third party platform to trade using IB. I would really like a platform that has some great CUSTOM charting software; namely charts I can draw horizontal lines (or price levels) from a beginning point (or origin), but not 'earlier' than that particular beginning point. For example, if a certain stock hit a low of x price on a certain date in the past, the charting tool(s) will allow me to draw a horizontal line that begins on the low of that date up to the present but not EARLIER than that point. I'm wondering if Tradestation can do this. Furthermore, I would really appreciate any feedback and opinions traders might offer as to which is the best platform they've ever been exposed to. Many thanks to anyone who might be able to help.


Re: differences in Implied Volatility of an option (needed as input for formulas)

 

Thanks, that clears a lot!!

I have some questions left.

1) Should I get the same values if I use the calculateImpliedVolatility?
2) Is this function (calculateImpliedVolatility) working and operational? I was reading that it was not working.
3) Wherefore is the whole expiration IV used? I would guess that you normally use the IV of the option itself. Not one IV of the whole chain at expiration.


Re: best trading platform for IB

 



Thanks Nick. Have you tried other platforms?
On Monday, 2 August 2021, 02:29:04 pm GMT-4, Nick <news1000@...> wrote:


NinjaTrader is free for charting so you can give that a try for no risk. If you want to place orders from NinjaTrader you would need a paid version.


On 8/2/2021 2:07 PM, conrad modica via groups.io wrote:

To All:

I'm wondering if anyone can shed light on sharing their experiences with what they think is the best third party platform to trade using IB. I would really like a platform that has some great CUSTOM charting software; namely charts I can draw horizontal lines (or price levels) from a beginning point (or origin), but not 'earlier' than that particular beginning point. For example, if a certain stock hit a low of x price on a certain date in the past, the charting tool(s) will allow me to draw a horizontal line that begins on the low of that date up to the present but not EARLIER than that point. I'm wondering if Tradestation can do this. Furthermore, I would really appreciate any feedback and opinions traders might offer as to which is the best platform they've ever been exposed to. Many thanks to anyone who might be able to help.


Re: best trading platform for IB

Nick
 

¿ªÔÆÌåÓý

NinjaTrader is free for charting so you can give that a try for no risk. If you want to place orders from NinjaTrader you would need a paid version.


On 8/2/2021 2:07 PM, conrad modica via groups.io wrote:

To All:

I'm wondering if anyone can shed light on sharing their experiences with what they think is the best third party platform to trade using IB. I would really like a platform that has some great CUSTOM charting software; namely charts I can draw horizontal lines (or price levels) from a beginning point (or origin), but not 'earlier' than that particular beginning point. For example, if a certain stock hit a low of x price on a certain date in the past, the charting tool(s) will allow me to draw a horizontal line that begins on the low of that date up to the present but not EARLIER than that point. I'm wondering if Tradestation can do this. Furthermore, I would really appreciate any feedback and opinions traders might offer as to which is the best platform they've ever been exposed to. Many thanks to anyone who might be able to help.


best trading platform for IB

 

To All:

I'm wondering if anyone can shed light on sharing their experiences with what they think is the best third party platform to trade using IB. I would really like a platform that has some great CUSTOM charting software; namely charts I can draw horizontal lines (or price levels) from a beginning point (or origin), but not 'earlier' than that particular beginning point. For example, if a certain stock hit a low of x price on a certain date in the past, the charting tool(s) will allow me to draw a horizontal line that begins on the low of that date up to the present but not EARLIER than that point. I'm wondering if Tradestation can do this. Furthermore, I would really appreciate any feedback and opinions traders might offer as to which is the best platform they've ever been exposed to. Many thanks to anyone who might be able to help.


Re: ib gateway 981 cannot auto restart by default jts.ini

YSS
 

because it's a feature, so you need to enable it explicitly


ib gateway 981 cannot auto restart by default jts.ini

 

Hi,

ib gateway 981 cannot auto restart by default jts.ini, but I add AutoRestart param and it works.

[u:igmpicmnfljcdneooiecjhfedlhfbjeijomflgdo]
AutoRestart=1

I am confused with why?default jts.ini has no AutoRestart?

thanks


Re: How do you deal with partial fills?

 

One issue I have had with allornone orders, is the orders would take forever to fill or wouldn't fill on stocks or options that are not heavily traded. I have noticed that when my orders are filled in multiple lots that the commissions usually vary on each lot, and occasionally?some of the commissions are negative.


Re: Architecture: real-time speed

 

Currently I use the TWS API, with wrapper classes surrounding that.? I went with this approach, so as bug fixes, enhancements, and?new versions of the TWS API (C++) SDK occur, I can simply do a drop in replacement of the portion released by IBKR.

The TWS API + wrapper classes are compiled into their own library.? ?My TWS server uses that library, along with NATS pub/sub libraries to subscribe and publish data to / from clients.? Besides flatbuffers the serialization layer also supports Google protobuffers.

The processes involved are:??

TWS IB Gateway or TWS UI? ? <==>? ? ?TWS Server <===>? Nats Server? <===> QT GUI_1, QT GUI_2, .... , QT GUI_N??
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??
Each component can be hosted locally or on different machines since they have dedicated IP/port addresses.
I currently run everything locally with multiple monitors to host more than one UI as well as the standard TWS UI, but it is a very flexible architecture.
FWIW, I've been a professional software developer for my career, specializing in middleware - so this sort of architecture is fairly standard (pub/sub message oriented middlewware) in the industry.
I personally would never consider anything but C++, as that is my main area of expertise combined with performance reasons and being able to program close to the metal e.g threads, mutexes, fast unordered hash maps, etc.

Although I use this product for my own personal trading, there is the potential of this becoming a commercial product.? It is an integrated approach which specializes in sicing/dicing one's portfolio in arbitrary ways - with an emphasis on option greeks - on the portfolio level. I realized I needed to build something like this, for portfolios that contain hundreds of positions - and it is nearly impossible to understand portfolio risk (by expiration date, by security) - with multiple complex positions consisting? of combinations of securities and options on those securities using any of the UI features which IBKR supplies, where I need these metrics updated as close to real time as possible, in a way that allows flexibility to slice and dice the information. (One key component of the QT UI is a pivot table widget which allows any metric to be grouped in any user desired way)

I have to do the whole API song & dance of 1) downloading positions 2) finding conIDs of each position - 3) geting security definitions for each conID, 4) getting the underlying security for each conID (if an option, for example) - and building a table of all positions & underlyings - which updates in real time and 5) getting realtime mkt data for each conID.? This table updates live on the server - and can transmit it's entirety in serialized format to the UIs - which also have their own table which is synchronized to the server's data table.? When a new UI is launched, it subscribes to all data, and builds its own internal table which should be in synch with that of the server.? ?

The idea of the product is to gain insight, and manage risk of all current positions - and is used in conjunction with the standard TWS UI. That is, as of now, trades are not made from this product.? But trading decisions can be made - for example - noticing that one's theta to delta ratio for all options in a particular security might need to be increased - so we can use that information to add some more theta by selling some out of the money calls to get the ratio to a level with less risk and more return.??

On another note - I had to build this for some other deficiencies of the TWS UI:
Some things the TWS API does - for example updating portfolio value (Net Asset Liquidation Value) - is only done every 3 minutes.? My software will update that value in real time by using the 3 minute Net Asset Liquidation Value,? finding the portfolio PnL associated with that value at that time - and then, as the portfolio PnL changes - compute a differential PnL - to come up with a pseudo- intermediate - value of the Net Asset Liquidation Value between these 3 minute updates supplied via the API.? This gets reset to what IBKR gives us via the API every 3 minutes - but for all in between updates of portfolio PnL, I can display a relatively accurate Net Asset Liquidation Value (total portfolio value).? I also have incorporated QuantLib's option modeling math - so I can see not only what IBKR tells us (which is a necessary reference for ensuring this software matches up with the IBKR supplied UI), but also what I believe can be a more accurate (or a second opinion) of option metrics - particularly close to option expiration, where greeks and models can vary? quite a bit - especially the last few hours of trading expiring options.? For example, IBKR says days to expiry is 0 on the day of expiry - even if there is a full day of trading left - so I would like to calculate theta with better resolution than what IBKR provides - and also not have opaque option greek modeling.





Re: How do you deal with partial fills?

 

On Sat, Jul 31, 2021 at 07:11 AM, J G wrote:
default counter

@JG

Thanks a lot, it seems you are right. Yes, it is US shares.

?If it is how you say with commissions, then its all fine, but my impression was odd lot is getting separate commission. At least TWS is displaying commission for each odd lot buy/sell order same as even lot. ( so essentially its 4x $1 ). But i will double check.


Re: Limitations on data requests. Requesting 120 options in option chain.

 

Super, thanks a lot!! I didn't know that.

One question left. Can someone tell how reliable the Ctrl Alt = counter is?

If I fetch an option chain only in TWS and chose SMART as exchange. It counts the lines correctly. But if I switch to another exchange like CBOE the count (roughly) doubles. So to my experience only SMART gives the right values. The other exchanges twice too much.


Re: How do you deal with partial fills?

 

On Sat, Jul 31, 2021 at 04:12 AM, Luke wrote:
It is also a bit strange to me, because it pretty much always fills at 100 and then the remainder. Ie if order is 130 shares, it would fill 100 and then 30.
From your above sentence I assume that you are talking about US shares? The default counter is one "lot", which consists of 100 shares. Often do institutional traders work with lots. So any multiple of a lot fills usually quickly. The remainder, less than 100 shares, is called an odd lot. It might take longer to get those filled. This might explain your observation.
As long as you don't modify the quantity of your order will you not be charged extra for getting your partial lots filled. Using AllOrNone will not influence the commission on the trade.


Re: Architecture: real-time speed

Eduardo Esteva Kremer
 


Dave,

Interesting approach !

To what extent do you use TWS API ? I figure out you must be deviating incoming data toward flatbuffers... so data no longer goes through the TWS API's signal/wait...??

I see you implemented 2 loosely coupled processes. Isn't it ?

You run these processes on the cloud or on local servers ?

Eduardo Kremer


On Fri, Jul 30, 2021 at 5:11 PM <dlinenbe@...> wrote:
I have built a QT UI using the TWS API, so this is one person's model of how to do things...

I have a server process which uses the TWS API and flatbuffers to encode results into a binary serialization format.
That? server,? at regular small intervals, send arrays of such results to receiving QT GUI processes using NATS.? (The TWS API server sends data to a NATS central distribution process).? GUI processes subscribe to NATS topics.

This works very well - and allows multiple UIs on either the same machine and/or multiple machines to receive / update data tables / graphs etc in real time. The NATS subscriber thread in each QT process is multithreaded - so results are posted into a thread safe queue in order to share the data with the GUI thread.? The GUI thread reads from the queue and distributes the results to the table & graph widgets.?

Dave Linenberg


?


Re: Architecture: real-time speed

 

Cool thread. I also just implemented the tws client protocol instead of using the IB libraries, it¡¯s not too bad, as others mentioned..

Anyway, I cut the java api some slack since it seemed to be assuming you¡¯d build UI apps with it (or it was more or less just extracted from TWS itself), so few threads and non-blocking callbacks are good but not very fun with old java !


Re: differences in Implied Volatility of an option (needed as input for formulas)

 

These are essentially all the same
- The volatility smile means there is not a single value across different strikes/expirations, see below.
- IB and other sites will generally provide volatility in two different ways, as % per day or as relative change per year.? To go between the two you multiply by the square root of the number of market days in a year, that is roughly 16, so 2.5% becomes roughly 2.5% * 16 = 38% = 0.38.

In the graph below, you can clearly see that the Y axis is labelled "annual" and the values are about 40% (or 0.4).



But you can change that to days, and then you get the same curves but with a different Y axis scale, now values are around 2%, and the Y axis also shows the change.


differences in Implied Volatility of an option (needed as input for formulas)

 

Can someone give me some more information about the implied volatility? I have searched a lot but I'm stuck.

I need the implied volatility of an option that I can use as an input for the binomial or Black and Scholes formula. If I compare different ways to get them I see many differences. What is the right way to get them via the API?

When I compare the same option via

Bartchart.com? 39.00%
IBSample app (c#) via TickOptionMessage.ImpliedVolatility = 0.419
TWS I added Implied Volatility % Column in the option chain = 2.5%
There is a function calculateImpliedVolatility but I don't know if I need that one.
And there is also one IV for the whole expiration date see image below

They are all different. I hope someone can explain the differences and which I should use for the formulas.


Re: Architecture: real-time speed

 

I have built a QT UI using the TWS API, so this is one person's model of how to do things...

I have a server process which uses the TWS API and flatbuffers to encode results into a binary serialization format.
That? server,? at regular small intervals, send arrays of such results to receiving QT GUI processes using NATS.? (The TWS API server sends data to a NATS central distribution process).? GUI processes subscribe to NATS topics.

This works very well - and allows multiple UIs on either the same machine and/or multiple machines to receive / update data tables / graphs etc in real time. The NATS subscriber thread in each QT process is multithreaded - so results are posted into a thread safe queue in order to share the data with the GUI thread.? The GUI thread reads from the queue and distributes the results to the table & graph widgets.?

Dave Linenberg


?


Option Model IV and Model Price

 

¿ªÔÆÌåÓý

Under the Options window in TWS, it's possible to add columns "Model IV %" and "Model".? Does anyone know how these values are calculated?? I suspect that they have a model for price and then simply calculate Model IV% using the Black-Scholes or similar formula.? If that's the case, how do they determine the price as it's often very different than midpoint or last traded price?