TRADING TECHNIQUES



One Small Adjustment Can Work Wonders

Flexible Candlesticks


by Viktor Likhovidov


In the November 1999 STOCKS & COMMODITIES, Viktor Likhovidov introduced a method by which candlesticks, a subjective charting technique, could be used to develop objective, quantitative values - values that could be used in software for trading. In this latest offering, Likhovidov adds flexibility to his basic method, known as CandleCodes, and in this way garner market sentiment results for different types of markets.

CandleCodes, which I introduced in an article for STOCKS & COMMODITIES in 1999, are intended to make objective the popular but very subjective candlestick technique. There are several versions of CandleCodes that could be useful for chart analysis and construction of trading systems. The general form of such indexes is obtained by assigning variable coefficients (weights) to the elements of the candlestick (body and shadows). The general formula for adjustable CandleCodes is:

Adjustable_CandleCode = BCandleCode-b + U CandleCode-u + L CandleCode-l

where B, U, and L are coefficients (undetermined at the moment) that need adjusting. B refers to the body of the candlestick, U the upper shadow and L the lower shadow.

The most reasonable method of assigning coefficients is based on your trading goals. You want to select values for B, U, and L that ensure maximum profitability for your trading system when applied to a specific market. I call this variation adjustable CandleCode. The values for B, U, and L are determined by specific trading systems and will differ for different markets.

BUILDING IT

The premise of the construction of the variation of the CandleCode is the same as the original. The only difference is that I use a slight modification. In this variation, all three main elements of the candle (body, upper shadow, and lower shadow) will have a standard range of assigned digital codes, but bullish elements will take positive values whereas bearish elements will take negative ones.

The upper shadow and white candle's body are bullish, and so they are assigned a value or sign of +1. The lower shadow and black candle's body are bearish, so they are assigned a value or sign of -1. The range of sizes for a candle's elements is divided into four categories: none, small, middle, and large. Each category gets a size value assigned. They are as follows:

  • None element (when there is no body; commonly referred to as doji or zero length shadow): size equals zero.
  • Small element (when size of body or shadow is small): size equals 1*sign.
  • Middle element (when body or shadow is of average size): size equals 2*sign.
  • Large element (when body or shadow is large): size equals 3*sign.
  • The weighted sum of these sizes constitutes the adjustable variation of CandleCode.

    AdCC = U UpshadSize + B BodySize + L LshadSize

    The MetaStock code for this is displayed in sidebar, "Adjustable CandleCode for MetaStock." The application of the AdCC is displayed in the hourly chart of spot Swiss francs from December 5 to December 13, 2000 (Figure 1). The three upper graphs represent UpshadSize, BodySize, and LshadSize, and the lower graph is AdCC where all three parameters, U, B, and L, equal 0.33. The overlay of smoothed AdCC (Ema34) on the price chart clearly shows the ability of such an indicator to reflect important changes in the sentiment of the market.

    FIGURE 1: Here's how the elements of a candle are used to construct the adjustable CandleCode.

    ...Continued in the October 2001 issue of Technical Analysis of STOCKS & COMMODITIES


    Viktor Likhovidov, a financial analyst and consultant based in Vladivostok, Russia, performs research in the areas of pattern recognition, neural networks, and mathematical methods in currency markets analysis. He may be reached at ltfx@fastmail.vladivostok.ru or lita@math.dvgu.ru.

    Excerpted from an article originally published in the October 2001 issue of Technical Analysis of STOCKS & COMMODITIES magazine. All rights reserved. © Copyright 2001, Technical Analysis, Inc.



    Return to October 2001 Contents