Real-time charts for Windows, Mac and GNU/Linux with Interactive Brokers
- About
- Screenshot
- Features
- Source code
- Documentation
- Requirements
- Agreement
- FAQ
- Contact
About
jTWScharts is a real-time charting application for Interactive Brokers Trader Workstation.
I am providing the entire source code in exchange for a one-time fee to anyone interested
subject to a copyright agreement.
The source code is not heavily commented but is delivered with documentation for programmers.
I have also available a end-user closed source version.
jTWScharts has been developed and tested on Windows and GNU/Linux
and works also on Mac.
I started programming jTWScharts in 2002 for my trading needs and I've been using it personally every day
since then to assist in my real-time trading decisions.
jTWScharts is more suitable for programmers and developers but the end-user version allows for
enough flexibility in changing the default settings. The end-user may edit
several configuration text files according to the instructions provided in the end-user documentation.
jTWScharts displays and updates real-time the default futures contracts you see in the screenshot below.
Screenshot
This is a screenshot showing my basic setup during the day (click to maximize).
It's wide since I trade on a 1600x1200 resolution display.
I use the Motif look and feel but jTWScharts can be compiled with a different look and feel.
jTWScharts is controlled through a mouse right-click on the application background that will bring a
pop-up menu with several options.
A right-click with the mouse over any chart will bring another pop-up menu
with several settings you can change.
There are additional small screenshots available in the features' list below.
Features
All these features were programmed at one time or another when I was interested in testing
new tools for my trading, but these days I've settled for momentum and moving average slope indicators.
The main strength of the application is real-time chart updates of several contracts with zero lag,
which is important for short term trading.
Back-fill is NOT available. Also note that you need to perform a daily update of some texts files
in order to have updated Floor Pivots, E-Prem trigger levels and Market Profile before starting jTWScharts.
I can customize jTWScharts according to your needs prior to delivery
and after the purchase I can help you change the default settings or hack the source code.
Data features:
- Automatic connection to TWS and automatic data requests on application start-up
- Custom connection settings [+]
- Custom data/contract requests [+] [+]
- Save time/price/volume data from Interactive Brokers TWS to file
- Playback saved data files [+]
- Playback Globex time and sales files downloaded daily from the CME public FTP server ftp://ftp.cme.com/pub/gtime/ [+] NOTE: these data files are no longer available for free but can be purchased from CME Group.
Charting features:
- Real-time (zero lag) chart updates
- Constant volume charts, constant tick charts and minutes/seconds charts
- charting of volume traded at bid/ask (point & figure) [+] [+]
- Bar, candles and line charting [+] [+]
coloring based on momentum [+]
or higher highs/lower lows [+]
- Pre-defined chart layouts [+]
- Quick save chart screenshot to disk
- Bid/Ask plot near last price [+]
- several other chart configurations: draw chart from the left side [+]
adjustable price scale (fixed number of pixels per ticksize vs. draw on available area),
adjustable bar width and spacing [+] [+] [+]
decimal price format vs. 1/32 (bonds) vs. 1/64 (t-notes), black background vs. white background [+]
- Time Scale
- Floor Pivots [+]
pivot range [+]
previous day hi/low/settle [+]
day's high/low [+]
- Opening Range [+]
- Gann price levels - octaves [+]
- Market Profile:
previous day market profile time/volume/trades computed from Globex file [+]
intraday total [+]
and 30 min. intervals from Interactive Brokers datafeed [+]
- Program Trading indicators:
Tiki extreme plots over chart bars [+]
E-Prem extreme plot [+]
Tick-NYSE extreme plot [+]
- Market Depth:
draw market depth near last price [+]
indicators/oscillators based on:
minimum size [+] vs. maximum size [+]
minimum cumulative [+] vs. maximum cumulative [+]
- Volume [+]
- Volume Balance (buys at ask minus sells at bid) [+]
- Technical Studies:
CCI [+]
momentum indicators [+]
smoothed stochastic indicator [+]
- Technical price overlays:
price channel [+]
moving average slope indicator [+]
simple moving average [+]
moving average band for the highs/lows [+]
volatility band [+]
swing line indicator [+]
- Time Alerts for the most common scheduled market/economic reports during the trading day [+] [+]
- basic sound alert implementation for upticks and downticks
Here are some ideas of what you can do with jTWScharts:
use it for real-time charting with Interactive Brokers,
use it to playback Globex time and sales files or saved data files,
use the source code or parts of it to base your own applications on,
adapt the source code to create your mechanical trading system, etc ...
Source code
I have available different jTWScharts offers:
- jTWScharts for Programmers (Java source code + programmer documentation + end-user documentation)
- jTWScharts for End-Users (Java .jar files + end-user documentation)
- jTWScharts 7-day evaluation version (FREE but limited functionality)
- jTWScharts playback-only version for End-Users
- parts of the source code on demand
jTWScharts should be very easy to extend, adapt and change for programmers and developers with
access to the source code and documentation.
The end-user version of jTWScharts is also flexible and configurable. Most of its parameters
and configurations can be edited in text files. The end-user can change time-frames, default contracts,
charts' positions, indicators' parameters, etc ...
For the curious, I provide here the main configuration Java
classes in jTWScharts.
Class allContracts lists all the contracts I may be interested in requesting data for
(note that the Contract structure comes from the Interactive Brokers API).
Class allTimeFrames lists the different intervals for constant volume charts,
constant tick charts, seconds and minutes charts that I am interested in.
Class allChartCoords lists the default charts sizes and positions for each contract in
jTWScharts workspace plus a numeric reference to a pre-defined chart layout.
Finally the most important information in this file is the allDataRequests array which
lists all the contracts I want jTWScharts to automatically setup for real-time charting.
The documentation provided has detailed explanations of all the configuration files.
You can check the directory file structure of jTWScharts source code.
The Interactive Brokers API files are located in the com/ directory.
If you wish to examine further here are the files in each directory:
- alert: classes that manage time alerts [+]
- data: classes that manage data [+]
- glib: library of frequently used graphic methods [+]
- graph: classes that build charts [+]
- lib: library of frequently used methods [+]
- main: starting point of jTWScharts [+]
- sound: classes for basic sound alerts [+]
- studies: classes for technical studies [+]
Documentation
jTWScharts is delivered with several pages of documentation.
Programmer documentation (approx. 20 pages) outline:
- Directories and files
- jTWScharts Java source files and directories
- jTWScharts provided scripts and files
- Example: Adding your Study or Indicator OR modifying an existing one
Appendix A
Appendix B
End-User documentation (approx. 40 pages) outline:
- Introduction
- Files and directories
- Connection
- Data
- Charts
- Time alerts
- Basic Sound Alerts
- Changing Settings
Quick-Start Guide:
- Configuring Trader Workstation (TWS)
- Running jTWScharts for the first time
- Custom requests for futures contracts, stocks, indexes and options
- Replaying saved data files
- Replaying Globex time and sales files
- Configure current contract months and rollover dates
- Exiting jTWScharts
- Update Fair-value and E-Prem buy/sell triggers
- Configure jTWScharts to draw updated floor-pivots
- Configure jTWScharts to draw market profile from previous trading session
Requirements
jTWScharts has low CPU and low memory requirements. I've been running it on a Windows computer
with a 1.7 GHz Celeron and on a GNU/Linux setup with a 800 MHz Pentium III.
jTWScharts reserves a maximum memory of 128 MBytes but only a fraction is used.
You need to have the Java SE JDK installed since there is need for compilation
either in the version for programmers or the end-user version.
You need to have an account with Interactive Brokers,
have at least one market data subscription
like for example the "US Securities and Commodities Bundle Non-professional - Level I" which
"Includes all Stock, Options, Futures and Bond markets" and is "Free".
Your TWS must be configured to accept incoming socket connections (Configure -> API -> Enable ActiveX and Socket Clients)
on port 7496 (Configure -> API -> Socket Port...). You should also configure TWS to auto-accept
incoming connections from your computer (Configure -> API -> Trusted IP Addresses... then
click "Create" and enter 127.0.0.1).
Agreement
By purchasing the source code you agree to use it only for personal purposes.
You can adapt and change the source code but you cannot re-sell the software.
You cannot transfer, rent, lease, lend, copy, share the software and/or documentation.
You may not reproduce or distribute any documentation without my permission.
You may install a copy of the software on a computer and freely move the software
from one computer to another, provided that you are the only individual using the software.
In no event shall I be liable for any special, incidental, indirect or consequential damages whatsoever
(including, without limitation, damages for loss of business profits, business interruption, loss of
business information or any other pecuniary loss) arising out of the use of or inability to use the
software product or the provision of or failure to provide support services.
FAQ
People frequently ask me if jTWScharts uses the JFreeChart library. The answer is No. If you check
their FAQ you see that it is not suitable for real-time charting.
This is why Interactive Brokers TWS built-in charting is not real-time.
I am also often asked what IDE (Eclipse, NetBeans, ...) do I use. The answer is: I don't use any IDE. I
program on a plain text editor so the source code can be easily imported into any IDE.
Click to Buy
FREE 7-day Evaluation
Forward this to someone.
To reach me use the Contact form.
Interactive Brokers (IB) is a low cost provider of trade execution and clearing services for individuals, advisors, prop trading groups, brokers and hedge funds. IB's premier technology provides direct access to stocks, options, futures, forex, bonds and funds on over 100 markets worldwide from a single IB Universal account.
Member NYSE, FINRA, SIPC. Visit www.interactivebrokers.com for more information.
© Copyright 2006-2024 Trading Software Lab. All rights reserved.