Next: , Previous: , Up: Top   [Index]

4 Invocation

The Chart command line is

chart [--options] [symbol…]

The default is to run the Gtk graphical interface. The optional symbol is an initial symbol to display.

symbol can be a partial name and is matched against the database the same way as in the Open dialog (see Open). So if TSCO.L is the only thing in the database starting with “TS” then just ‘chart ts’ is enough, or similarly for ^GSPC just ‘chart gsp’ may be enough.

The graphical options are


Start on the given display dpy. The default is the usual DISPLAY environment variable, which should be set as part of X startup, and shouldn’t need to be overridden. See man X for more.


Start with just the Watchlist dialog (see Watchlist). The initial list displayed is selected by the symbol options like ‘--all’ below.

chart --watchlist --all

A full main chart window can be opened from a symbol by double-clicking or choosing “Chart” from the Button-3 menu in the usual way.


Instead of running the full GUI, show just the stock ticker (see Ticker). The symbol options below select the symbols displayed. The default is the favourites list. For example,

chart --ticker --alerts

--display is a standard Gtk option, other standard Gtk options are accepted too, but there’s none that do much for Chart. See man 7 gtk-options for a full list.

4.1 Symbol Options

The following options select one or more symbol lists or symbols for --watchlist and --ticker above, and for the command line --download below. The options are cumulative, so you can have a combination like

chart --alerts --favourites '*.AX'

For the symbols in those lists plus all ‘.AX’ symbols. (In the ticker a combination like that updates if the list contents or available ‘.AX’ symbols changes.)


The “All” list of all current symbols in the database, meaning everything except the historical list.


The “Alerts” list of all symbols currently outside their alert levels.


The “Favourites” list. downloaded.


The given explicit symbols.


Shell style wildcards ‘*’ and ‘?’ can be used to match existing database symbols. ‘*’ matches any sequence of characters, ‘?’ matches any single character. For example to update all Australian shares

chart --download '*.AX'

The quotes ‘' '’ are only to stop the ‘*’ being interpreted by the shell (see Quoting in Bash Features).

4.2 Download

Chart can do its data downloading from the command line. Error messages are printed to the standard output and a progress status line is shown if it’s a terminal. This is good for a cron job or other automated update. The usual way to update everything is

chart --download --all

The symbol options above select what to display. Explicitly named symbols are added to the database if not already present, and are raised out of “historical” status if there’s some new data.

For --favourites only symbols from it already in the database are downloaded. Other symbols there are assumed to wanted for the watchlist, but not downloaded.

4.3 Other

Other options are


Print the program version, and exit.


Print a summary of the command line options, and exit.

4.4 Bash

Chart has some support for the GNU Bash command line completion feature (see Letting Readline Type For You in Bash Features).

The chart.bash script lets you hit Tab etc to complete symbols entered on the command line. For example type ‘chart --download bhTab could complete to ‘BHP.AX’. It uses the sqlite3 command-line program to access the Chart database. Command options are completed too, so ‘chart --doTab gives ‘--download’.

To load this, source the file from your .bashrc (see Bash Startup Files in Bash Features),

. chart.bash

See comments in chart.bash for more, including use with the bash_completion project (

Next: , Previous: , Up: Top   [Index]

Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2014, 2015, 2016, 2017 Kevin Ryde

Chart is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.