App-Chart

 view release on metacpan or  search on metacpan

doc/chart.texi  view on Meta::CPAN


The ticker scrolls prices along a line at the bottom of the screen, refreshed
periodically.  It's selected in the main window from the Tools/Ticker menu, or
can be run standalone with the @option{--ticker} command line option
(@pxref{Invocation}).

Mouse @key{Button-1} drags the text back and forward if you miss something or
want to hurry it up.  @key{Button-3} pops up a menu to pause, force a refresh,
or close it.  On a 2-button mouse @key{Button-3} is usually the right button.
Prices are automatically refreshed every 5 minutes while running and visible.

The default is to show the favourites list (@pxref{Symbol Lists}), but that
can be changed from the menu.  When standalone a symbol list or specified
symbols can be given on the command line.  For example to see everything in
the database

@example
chart --ticker --all
@end example


@c ---------------------------------------------------------------------------
@node Annotations, Averages, Display, Top
@chapter Annotations
@cindex Annotations

Annotations can be added to a chart, in the form of notes for particular days,
and lines drawn on the chart.

@section Notes
@cindex Notes
@cindex Text notes

@cindex Dialog, annotations
@cindex Edit/Annotations
Text notes are added with the Edit/Annotations dialog.  These are free-form
and can be used as personal reminders about particular events.  (Usually they
should be just a couple of words, as currently the drawing doesn't do a good
job with long text.)

@section Lines
@cindex Lines
@cindex Trend lines
@cindex Edit lines

Lines can be drawn on a chart as personal reminders of apparent trends or
support/resistance etc.  Lines can be drawn anywhere desired, and are stored
using date and price so they scale with the display.

@cindex @key{Button-2}
To draw a line press and hold mouse @key{Button-2} at the starting point, and
drag to the end.  On a two-button mouse @key{Button-2} usually means pressing
both buttons at the same time.

@cindex @key{H}
@cindex @key{Escape}
@cindex @key{D}
While drawing, press @key{H} to toggle between a sloping line (the default)
and a horizontal line.  Press the spacebar to swap to move the opposite end of
the line.  An existing line can be repositioned by pressing and dragging
@key{Button-2} near an endpoint.  Press @key{Escape} to abort an edit.  To
delete a line press @key{D} while dragging it.

@section Alert Levels
@cindex Alert levels
@cindex Alert list
@cindex Edit alert levels

Alert levels can be set if you want to know when a stock trades (or has a
bid/offer) above or below some price.  Symbols which have gone past an alert
level are put into the Alerts list.

@cindex @key{A}
Alert levels are edited like lines above.  While editing, press @key{A} to
switch to an alert, and then @key{A} again to toggle between an alert above
(the default) or below the level.  An above alert is drawn like

@example
          |
          |
----------+
@end example

@noindent
and below like
 
@example
----------+
          |
          |
@end example

Basically the little up or down tag at the right hand end points the direction
it will be interested in (ie.@: above or below).


@c ---------------------------------------------------------------------------
@node Averages, Channels and Boxes, Annotations, Top
@chapter Averages
@cindex Averages

When an indicator or average is based on a some number of past days, only
trading days are counted, so for instance 10 days is 2 weeks.  Days with no
trading (public holiday, trading halt, etc) are skipped too.

At the start of data, either the initial listing, or just the start of what's
been downloaded, generally a shortened period of averaging is applied, so
there's an average immediately shown, though it may not be based on less than
the desired period until N dayes, etc.

Of the following averages, the simple moving average and exponential moving
average are the best known.

@menu
* Simple Moving Average::
* Exponential Moving Average::
* Weighted Moving Average::
* Double and Triple Exponential Moving Average::
* Endpoint Moving Average::
* Fractal Adaptive Moving Average::
* Guppy Multiple Moving Average::

doc/chart.texi  view on Meta::CPAN

The following graph shows how the weights decrease for @math{N=15}.

@myimage{chart-wma-weights, WMA weights graph}


@c ---------------------------------------------------------------------------
@node Double and Triple Exponential Moving Average, Endpoint Moving Average, Weighted Moving Average, Averages
@section Double and Triple Exponential Moving Average
@cindex Double exponential moving average
@cindex Average, double exponential
@cindex Moving average, double exponential
@cindex DEMA
@cindex Triple exponential moving average
@cindex Average, triple exponential
@cindex Moving average, triple exponential
@cindex TEMA

The double exponential moving average (DEMA) and triple exponential moving
average (TEMA) are combination EMAs (@pxref{Exponential Moving Average}) by
Patrick Mulloy, designed to track recent prices even more closely than the
plain EMA@.  The calculation for DEMA is

@tex
$$ DEMA = 2 \times EMA[N] - EMAofEMA[N] $$
@end tex
@ifnottex
@example
DEMA = 2*EMA[N] - EMAofEMA[N]
@end example
@end ifnottex

and for TEMA,

@tex
$$ TEMA = 3 \times EMA[N] - 3 \times EMAofEMA[N] + EMAofEMAofEMA[N] $$
@end tex
@ifnottex
@example
TEMA = 3*EMA[N] - 3*EMAofEMA[N] + EMAofEMAofEMA[N]
@end example
@end ifnottex

Both are ``overweight'' on recent points so the moving average can actually
get ahead of recent prices in some unusual price patterns.  The following
graph shows the DEMA weights for @math{N=15}.

@myimage{chart-dema-weights, DEMA weights graph}

And the following is TEMA for the same @math{N=15}.

@myimage{chart-tema-weights, TEMA weights graph}


@c ---------------------------------------------------------------------------
@node Endpoint Moving Average, Fractal Adaptive Moving Average, Double and Triple Exponential Moving Average, Averages
@section Endpoint Moving Average
@cindex Endpoint moving average
@cindex EPMA
@cindex Least squares moving average
@cindex LSQMA
@cindex Average, endpoint
@cindex Average, least squares
@cindex Moving average, endpoint
@cindex Moving average, least squares
@cindex Time series forecast
@cindex TSF
@cindex Sharp, Joe
@cindex Average, modified
@cindex Moving average, modified
@cindex Modified moving average

The endpoint moving average (EPMA) establishes an average price by fitting a
least squares straight line (@pxref{Linear Regression}) through the past N
days closing prices and taking the endpoint of the line (ie.@: the line as at
the last day) as the average.

This calculation goes by a number of other names, including least squares
moving average (LSQMA), moving linear regression, and time series forecast
(TSF).  Joe Sharp's ``modified moving average'' is the same thing too.

The formula ends up being a straightforward weighted average of past N prices,
with weights going from @m{2N-1,2*N-1} down to @math{-N+2}.  This is easily
derived from the least squares formulas, but just looking at the weightings
the connection to least squares is not at all obvious.  If @ms{p,1} is today's
close, @ms{p,2} yesterdays, etc, then

@tex
$$ EPMA = { (2N-1) \times p_1 + (2N-4) \times p_1 + \cdots (-N+2) \times p_N
            \over (2N-1) + (2N-4) + \cdots + (-N+2) } $$
@end tex
@ifnottex
@example
       (2*N-1)*p[1] + (2*N-4)*p[2] + ... + (-N+2)*p[N]
EPMA = -----------------------------------------------
        2*N-1       +  2*N-4       + ... +  -N+2
@end example
@end ifnottex

The weights decrease by 3 for each older day, and go negative for the oldest
third of the N days.  The following graph shows that for @math{N=15}.

@myimage{chart-epma-weights, Endpoint MA weights graph}

The negatives mean the average is ``overweight'' on recent prices and can
overshoot price action after a sudden jump.  In general however because the
fitted line deliberately goes through the middle of recent prices the EPMA
tends to be in the middle of recent prices, or a projection of where they
seemed to be trending.

It's interesting to compare the EPMA with a plain SMA (@pxref{Simple Moving
Average}).  An SMA effectively draws a horizontal line through the past N days
prices (their mean), whereas the EPMA draws a sloping line.

The inertia indicator (@pxref{Inertia}) uses the EPMA.

@c @subsection Additional Resources
@c @itemize
@c @item
@c @uref{...} -- ...
@c @end itemize.


@c ---------------------------------------------------------------------------
@node Fractal Adaptive Moving Average, Guppy Multiple Moving Average, Endpoint Moving Average, Averages
@section Fractal Adaptive Moving Average
@cindex Fractal adaptive moving average
@cindex FRAMA
@cindex Average, fractal adaptive
@cindex Moving average, fractal adaptive

@uref{http://www.mesasoftware.com/technicalpapers.htm} @*
@uref{http://www.mesasoftware.com/Papers/FRAMA.pdf}

@cindex Ehlers, John



( run in 0.589 second using v1.01-cache-2.11-cpan-39bf76dae61 )