Sunday, 22 May 2011

Average True Range (ATR) Trailing Stops

Average True Range ("ATR") was introduced by J. Welles Wilder in his 1978 book New Concepts In Technical Trading Systems. ATR is a measure of volatility for a stock or index and is explained in detail at Average True Range. Wilder experimented with trend-following Volatility Stops using average true range. The system was subsequently modified to what is commonly known as ATR Trailing Stops.
ATR Trailing Stop Signals

Signals are used for exits:

    Exit your long position (sell) when price crosses below the ATR trailing stop line.
    Exit your short position (buy) when price crosses above the ATR trailing stop line.

While not conventional, they can also be used to signal entries — in conjunction with a trend filter.
Example



The RJ CRB Commodities Index late 2008 down-trend is displayed with Average True Range Trailing Stop (21 days, 3xATR, Closing Price) and 63-day exponential moving average used as a trend filter.
RJ/CRB Index with ATR trailing stops

Mouse over chart captions to display trading signals.

    Go short [S] when price closes below the ATR stop — while below the 63-day exponential moving average
    Exit [X] when price crosses above the ATR stop

ATR Trailing Stops Setup

Typical ATR time periods used vary between 5 and 21 days. Wilder originally suggested using 7 days, short-term traders use 5, and longer term traders 21 days. Multiples between 2.5 and 3.5 x ATR are normally applied for trailing stops, with lower multiples more prone to whipsaws.

The default is set as 3 x 21-Day ATR.

Closing Price is set as the default option. The alternative is HighLow (see Formula below).

Average True Range (ATR) Bands

Average True Range was introduced by J. Welles Wilder in his 1978 book New Concepts In Technical Trading Systems. ATR is explained in greater detail at Average True Range. Wilder developed trend-following Volatility Stops based on average true range, which subsequently evolved into Average True Range Trailing Stops, but these have two major weaknesses:

    Stops move downwards during an up-trend if Average True Range widens.
    I am uncomfortable with this: stops should only move in the direction of the trend.
    The Stop-and-Reverse mechanism assumes that you switch to a short position when stopped out of a long position, and vice versa. All too frequently, traders are stopped out early when following a trend and wish to re-enter in the same direction as their previous trade.

Average True Range Bands address both these weaknesses. Stops only move in the direction of the trend and do not assume that the trend has reversed when price crosses the stop level.
Average True Range Band Signals

Signals are used for exits:

    Exit a long position when price crosses below the lower Average True Range Band.
    Exit a short position when price crosses above the upper Average True Range Band.

While unconventional, the bands can be used to signal entries — when used in conjunction with a trend filter. A cross of the opposite band can also be used as a signal to protect your profits.

Example




The RJ CRB Commodities Index late 2008 down-trend is displayed with Average True Range Bands (21 days, 3xATR, Closing Price) and 63-day exponential moving average used as a trend filter.

   1. Go short [S] when price closes below the 63-day exponential moving average and the lower band
   2.Exit [X] when price closes above the upper band
   3. Go short [S] when price closes below the lower band
   4. Exit [X] when price closes above the upper band
   5. Go short [S] when price closes below the lower band
   6. Exit [X] when price closes above the upper band

No long positions are taken when price is below the 63-day exponential moving average, nor short positions when above the 63-day exponential moving average.

ATR Bands Setup

There are two options available:

    Closing Price: ATR Bands are plotted around the closing price.
    HighLow: Bands are plotted in relation to high and low prices, like Chandelier Exits.

The ATR time period default is 21 days, with multiples set at a default of 3 x ATR. The normal range is 2, for very short-term, to 5 for long-term trades. Multiples below 3 are prone to whipsaws.

See Indicator Panel for directions on how to set up an indicator.

Average True Range Bands Formula

Here is a brief outline:

  •    Average True Range is calculated in accordance with J. Welles Wilder's formula.
  •    The bands are calculated by adding/subtracting a multiple of Average True Range to the daily closing price.
  •   For the HighLow option, the multiple of ATR is added to the daily Low, and subtracted from the daily High.
  •     A ratchet mechanism ensures that the lower band only moves up in an up-trend and the upper band       only    moves down in a down-trend.
  •   .Plots are projected one day forward (e.g. the stop caculated from today's closing price is plotted for tomorrow)

Friday, 20 May 2011

learning ADX - Average Directional Index



ADX is part of the Directional Movement System developed by J. Welles Wilder but can be successfully used on its own to signal trend changes and to indicate whether a stock is trending or ranging.
ADX Signals
Trend Changes

A weakening trend is signaled when 14-day ADX turns down while above 40. Note that ADX only indicates trend strength — not trend direction. It may be wise to supplement ADX with a trend filter, whether directional movement or a moving average, to signal direction.
Trending or Ranging Markets

    ADX below 20 for any length of time indicates a ranging market;
    ADX rising above 20 indicates the start of a new trend;
    The trend signal is strengthened if ADX breakout is followed by a failed swing;
    ADX above 40 indicates a steep trend, but often precedes a reversal.
Example

Apple Inc. [AAPL] is displayed with Average Directional Index (14 days) and 14-day Twiggs Momentum as a trend filter.




   1. Go short when ADX rises above 20 and Momentum is below zero.
   2. ADX down-turn above 40 warns that the trend is weakening.
   3. Exit when Momentum crosses above zero.
   4. ADX holding below 20 indicates a ranging market.
   5. Go long when ADX rises above 20 and Momentum is above zero.
   6. Increase position when ADX recovers above 20 and Momentum still above zero.
   7. Exit when Momentum crosses below zero.

ADX Setup

The default ADX period is set at 14 days.

See Indicator Panel for directions on how to set up an indicator — and Edit Indicator Settings to change the settings.

learning Accumulation Distribution

Accumulation Distribution tracks the relationship between price and volume and acts as a leading indicator of price movements. It provides a measure of the commitment of bulls and bears to the market and is used to detect divergences between volume and price action - signs that a trend is weakening.
Accumulation Distribution is an enhancement of the On Balance Volume indicator. It first compares opening and closing prices to the trading range for the period, the result is then used to weight the volume traded.
Trading Signals

The strongest signals on the Accumulation Distribution are divergences:

    Go long when there is a bullish divergence.
    Go short when there is a bearish divergence.

Stop-losses should be placed below the most recent low (when going long) and above the latest high (when going short).

EXAMPLE

Microsoft is plotted with  Accumulation Distribution Accumulation Distribution. Divergences are shown by  Accumulation Distribution Divergences trendlines.

Microsoft Accumulation Distribution

Mouse over chart captions to display trading signals.

    Go long [L]. The bullish divergence correctly predicted the subsequent rally.
    Go short [S]. The bearish divergence signaled the correction in January.
    Go short [S]. The bearish divergence signaled the correction in April.

Setup
Indicator Panel provides directions on how to set up an indicator. Edit Indicator Settings to change the default settings.

Accumulation Distribution Formula

The Accumulation Distribution Index is calculated as follows:

    Closing Price is compared to Opening Price:

              Close - Open

    And compared to the day's range:

              (Close - Open) / (High - Low)

    The result is multiplied by Volume for the day:

              (Close - Open) / (High - Low) * Volume

    The Accumulation Distribution Index is calculated as a cumulative total of each day's reading.

EQS Formula

Some charting software use a simpler formula where the Open price is not available:

                    {(Close - Low) - (High - Close)} / (High - Low) * Volume

The Close is compared to the day's range rather than to the Opening Price.