Keyboard Shortcuts
ctrl + shift + ? :
Show all keyboard shortcuts
ctrl + g :
Navigate to a group
ctrl + shift + f :
Find
ctrl + / :
Quick actions
esc to dismiss
Likes
- Twsapi
- Messages
Search
Re: Login GUI goes blank after install on Linux
Thanks for the suggestions.? After digging deep into the interwebs, I finally found the solution for anyone that's in the same boat.? Java and xrdp don't play well with color depths other (greater) than 24 bit.? Once I changed (reduced) the RDP setting to 24 bit and in xrdp.ini uncommented: xserverbpp=24 and changed: max_bpp=24, it all worked fine.
This was a doozy to figure out - hope nobody has the same pain going forward. TJ |
Re: Any reason this moving average isnt adding up?
I figured it out, I still wasnt pulling enough candles. I was pulling 100 at a time, thinking we are going to cut -50 away from NA to build the MA and 50 remaining would be enough for weight since its exponential. Not the case. I've matched the MA's doubling the amounts for pulling 200 at a time, 50 to NA and 150 is enough to properly weight the average.?
Sometimes you gotta post the question first and let the problem know your hunting for a solution before it comes up LOL |
Any reason this moving average isnt adding up?
Heya, heres the code for my moving average. A 50 ema?
?
def movingAverages (DF, b = 50):
? ? lines = DF.copy()
? ? lines["MA_50"] = lines["Close"].ewm(span = b, min_periods = b).mean()
? ? return lines
? ?? I am pulling historical candles, putting into a dataframe, then adding the MA to it like this? histData(tickers.index(ticker), usTechStk(ticker), "3000 S", "30 secs")
time.sleep(0.5)
df = dataDataframe(app,tickers,ticker)
df["MA_50"] = movingAverages(df)["MA_50"]
df.dropna(inplace = True)
When I run the code all together, my MA is off by 2.19 points on a e-mini contract on my 51st candle (the first one that isnt NA) And the MA is off by 0.43 points on the most current candle.? Here is the configuration of my MA in IB.. Any idea why the two arnt matching? |
Re: How to get historical daily data at a specific time?
If you're using Pandas, just filter the data. For example, in one of my programs, I want 5-minute bars, but only from 7am to 5pm. I d/l the data in the usual manner: app.reqHistoricalData(1,?es_contract,?'',?'6?D', ??????????????????????'5?mins',?'TRADES',?0,?1,?False,?[]) I put it into a simple data frame. df?=?pandas.DataFrame(app.data) Then I make my calculations, arrange my columns, and whatever else. Last, I filter. Like so: filter_df?=?df.between_time('06:55',?'16:55') On Wed, Jun 9, 2021 at 9:21 AM Patrick C <zenfiretrading@...> wrote: I would also like to know if there is a way possible to pull historical bars from a specific start time? All within reason, like I want to pull the last 2 days of 1 min bars, but only want to start at 9:30am today.? |
Re: Login GUI goes blank after install on Linux
You can uninstall java library and reinstall it again instead of redoing the whole VM reinstall. This way you can pinpoint the culprit to be the java library settings issue (conflict with IDE). If that doesn't fix the problem then its another library or OS issue which should be easily found but at least java is not the problem. P.S. on Windows or Ubuntu I have not seen this happen so it could be an openSUSE issue. - Bruce On Wed, Jun 9, 2021, 4:40 AM <tjisana.lewis@...> wrote: Hey all, |
Login GUI goes blank after install on Linux
Hey all,
I've thoroughly searched the forum and the web to find a solution to this problem to no avail.? I've installed TWS and IBGW on a fresh openSUSE Hyper-v installation which goes off without a hitch.? The programs launch fine and I can log in to my accounts.? Then after a few reboots, the GUI comes up but no buttons or text renders when I launch both programs.? I see where I can type something because my mouse changes, but no text is visible.? Uninstalling TWS and IBGW don't seem to fix it (it remains this way unless I do a clean install of the VM and start over). Have any of you seen this?? It may be connected to my installation of the Eclipse CDT C++ IDE (I'm not sure but it's the only other Java-based program installed).? Any idea on what could cause the TWS/IBGW apps to launch blank like that (especially after it works once or twice)? Cheers, TJ |
How to track orders via API, works in live not in paper trading
YSS
Hello,
I have many orders and I watch the positions via the API, I use the OrderID field which works on Live but when I code and I am using TWS Paper trading login when I place orders the Order ID Field stays empty. I see we can have an Order Reference field which would solve it, I just would need to populate it with a unique ID I make but I cant' seem to find where I can fill in this field in an already placed orders. My question is: 1/ Is the Order ID the best way to get information about my orders via the API? 2/ If so, since I can't use this in paper trade mode, do you have an alternative (like Order Reference?) Thanks for the help! Y. |
How to get historical daily data at a specific time?
Is there a way to request historical daily data (only need a snapshot at a specific time but could use daily close) at a specific time? I need the last 60 days of daily prices at 5pm EST. I read that the close time is dependent on what timezone the user chose upon logging into tws/gateway. Is that true?
If I set the timezone to EST+7 which corresponds to 5pm EST when it's midnight at the EST+7 timezone (ignoring potential issues with dst) would the daily close correspond to 5pm eastern time?? Thanks |
Re: Connecting to ib-gateway in docker or WSL
You would require a GUI on Ubuntu container to run IB-Gateway and connect your client to it. Try installing VNC server on the container and then connect to it from your host (windows) machine. It should work. You can refer to on the how part.
Or, you can skip all the steps of installing a browser, VNC server and so on, and use image. All you need to do is to connect to it, install IB-Gateway and connect your client. I have used it with TWS and it works like a charm. |
Re: multiple logins to same account
Haven't done it, but the following sounds promising They explicitly state your use case: "Individual account holders have the ability to add multiple users to their IBKR account. The account holder may wish to add a second user registered under their own name for the purpose of opening two TWS sessions simultaneously (one for normal access and the other for connecting via an API)" Let us know how it goes ? Am 8. Juni 2021 um 20:30:05, ds-avatar (dimsal.public@...) schrieb:
|
Connecting to ib-gateway in docker or WSL
Hello.
I have a distro of ib-gateway from linux docker container, copied it into WSL2 Ubuntu environment, and trying to connect from Windows host. I tried different manuals how to forward ports from windows host to WSL2, but still can't reach 127.0.0.1 : 4002 (for example) and connect my client to TWS API. Have anyone tried smth like that, connecting to IB gateway that in different environment? |
Re: multiple logins to same account
You can access you account in the browser without disconnecting the trading session. Trading will not be available from the browser but other than that you will be able both to view your account and configure it.
In the Android App there is also "Read only" mode but I didn't figure out how to use it since it always asks to drop the?other trading session or retreat from logging in. |
Re: multiple logins to same account
corneliu maftuleac
As far as I know there is no way.
To overcome this, we have written a small standalone app which runs in the same container as the tws-gateway and implements a tcp server with it's own protocol that just forwards the message back and forth to how many clients we want. There are also serious limitations with this method, but works for us. |
multiple logins to same account
Stuart Cracraft
Hi.
I run twsapi 7x24x365 on cloud. Occasionally I need to use the IBKR account on my iPhone to view read only. When I do, it disconnects the cloud logon which is not good because that is the mechanism by which all the automated trades are done. Is there a way to lift the multiple login prohibition? Stuwrt |
to navigate to use esc to dismiss