You are on page 1of 62

Bar chart with swing lines

Toronto TASUG March 2003

preliminary 030326 - 1 johncw_97@yahoo.com

OHLC Bar
Bar is represented by 4 elements
Open High

range = high - low Close Low

preliminary 030326 - 2 johncw_97@yahoo.com

Bar classification[1][2]
1. Up bar
The bar on the right is called an UP bar. It has a higher high and a higher low than the previous bar. Open and close positions do not matter.

preliminary 030326 - 3 johncw_97@yahoo.com

Bar classification
2. Down bar
The bar on the right is called an DOWN bar. It has a lower high and a lower low than the previous bar. Open and close positions do not matter.

preliminary 030326 - 4 johncw_97@yahoo.com

Bar classification
3. Inside bar
The bar on the right is called an INSIDE bar. It has a lower high and a higher low than the previous bar or simply its trading range is inside that of the bar on the left. Open and close positions do not matter. Inside days are essentially slowdowns or pauses in the market action Temporary interruptions as buyers and sellers are unable or unwilling to push beyond the previous days range. This behavior suggests the market is undecided about direction.[3] Narrow-range bars and inside bars represent short-term volatility lows out of which price can move sharply.[4]
preliminary 030326 - 5 johncw_97@yahoo.com

Bar classification
4. Outside bar
The bar on the right is called an OUTSIDE bar. It has a higher high and a lower low than the previous bar or simply the trading range is outside that of the bar on the left. Open and close positions do not matter. Outside days are fairly common and any value they have is tied to such factors as the relationship of the bars closing price to the opening price and current trend. Some traders interpret outside days as signals of either continuation moves (i.e. those in the same direction of the trend) or reversals, depending on these factors.[5] Outside bars can provide potential entry signals, if you know what to look for and what to look out for. [6] preliminary 030326 - 6 johncw_97@yahoo.com

Bar classification
5. Neutral/borderline bar*
The bar on the right is an example of a NEUTRAL bar. It is a bar that does not fall into the other previously defined classifications. Basically either the high or low is the same as the previous bar.

Open and close positions do not matter. * Some people may relaxed definitions such that these bars may be included in the previous four classification. For the example above, some may consider it to be a down bar or maybe an outside bar. preliminary 030326 - 7 johncw_97@yahoo.com

Bar summary
1. 2. 3. 4. 5. outsidebar = H > Ref( H, -1 ) AND L < Ref( L, -1 ); insidebar = H < Ref( H, -1 ) AND L > Ref( L, -1 ); upbar = H > Ref( H, -1 ) AND L > Ref( L, -1 ); downbar = L < Ref( L, -1 ) AND H < Ref( H, -1 ); neutralbar is one that does not match any of the above
or

neutralbar = L = Ref( L, -1 ) OR H = Ref( H, -1 );

preliminary 030326 - 8 johncw_97@yahoo.com

Bar summary

1. 2. 3. 4.

An alternative (without neutral bar):


outsidebar = H > Ref( H, -1 ) AND L < Ref( L, -1 ); insidebar = H <= Ref( H, -1 ) AND L >= Ref( L, -1 ); upbar = H > Ref( H, -1 ) AND L >= Ref( L, -1 ); downbar = L < Ref( L, -1 ) AND H <= Ref( H, -1 );

preliminary 030326 - 9 johncw_97@yahoo.com

Who is in control?
1. 2. 3. 4. 5. 6. In general, one can tell how bullish or bearish a bar is by looking at factors such as: The closing price versus the open price. The closing price versus the previous close. The position of the closing price within the range of the bar. The size of the range versus the previous bars. The volume traded. Gaps[7] within the chart.
preliminary 030326 - 10 johncw_97@yahoo.com

Control example
Bearish example
One would expect that price would be lower in the short term because: Down bar Negative (close < open) bar Open near the high and close near the low Low is lower than low 2 bars ago Not only did it closed below the close of previous bar, it closed below the close of 3 bars ago Series of three up bars. First two are positive or bullish (open > close) and the next is negative or bearish (close < open).

preliminary 030326 - 11 johncw_97@yahoo.com

Further control information


In terms of the battle between buyers and sellers, one should look at candlesticks pattern doji, harami, hammer, hanging man, engulfing etc. Stevens[8] has a chapter Recognition and Analysis of Chart Patterns which covers bar patterns with numerous examples. Pring[1] has a chapter one and two bar patterns with Key Reversal Bars, Exhaustion Bars and Pinocchio Bars. Pring[9] recently published an article on two bar reversal pattern. Examples charts of chart patterns provided at the end.

preliminary 030326 - 12 johncw_97@yahoo.com

Some ways to plot bar charts


1. One colour for all bars. 2. Colour bars with green representing close greater than previous close and red representing close less than previous close. 3. Colour bars (like candlesticks) with green representing open greater than close (like up candles) and red representing close less than open (like down candle). 4. One colour bars with symbols showing various patterns like reversal pattern. 5. Various colours for each type of bars.
preliminary 030326 - 13 johncw_97@yahoo.com

Colour bar chart


One can assign colours to the bars
1. 2. 3. 4. 5. Up bars Down bars Inside bars Outside bars Neutral bars green red yellow blue white

preliminary 030326 - 14 johncw_97@yahoo.com

Daily bar chart of DJ-30

preliminary 030326 - 15 johncw_97@yahoo.com

Daily bar chart of DJ-30

Colour bars using AmiBroker[10]

preliminary 030326 - 16 johncw_97@yahoo.com

Daily candlestick chart of DJ-30

preliminary 030326 - 17 johncw_97@yahoo.com

Daily candlestick chart of DJ-30

Colour candlesticks using AmiBroker[10]

preliminary 030326 - 18 johncw_97@yahoo.com

Trends
In general, most consider Uptrend is a series of bars with higher highs and higher lows. Downtrend is a series of bars with lower highs and lower lows.

preliminary 030326 - 19 johncw_97@yahoo.com

Trends
With up and down bars, swing lines can be drawn easily.

preliminary 030326 - 20 johncw_97@yahoo.com

Trends
According to Dunnigan[2]: An Upswing starts when a bars high and low prices rise above the respective high and low prices of the latest Downswing. Prices then remain in an Upswing until such a bar that the high and low prices decline below the respective high and low prices of the highest bar of the Upswing. The highest price in the Upswing is called a TOP.

preliminary 030326 - 21 johncw_97@yahoo.com

Trends
According to Dunnigan[2]: A Downswing starts when a bars high and low prices decline below the respective high and low prices of the highest bar of the latest Upswing. Prices then remain in a Downswing until a bar high and low prices rise above the respective high and low prices of the lowest bar of the Downswing. The lowest price in the Downswing is called a BOTTOM.

preliminary 030326 - 22 johncw_97@yahoo.com

Trends
Dunnigan swing[2]
Highest bar of Upswing Start of downswing Start of Downswing

Start of Upswing Start of Upswing Lowest bar of downswing Lowest bar of downswing

preliminary 030326 - 23 johncw_97@yahoo.com

Trends
According to Gann swing[11]*: Upswing: From down to up. The swing direction can change from down to up only if the market makes two consecutive highs. When the swing direction changes from down to up, the low of the downswing is called a valley and represents supports.
*Using Gann swing definition[11] (on page 54) used by charting program Fibonnaci Trader.
preliminary 030326 - 24 johncw_97@yahoo.com

Trends
According to Gann swing[11]: Downswing: From up to down. The swing direction can change from down only if the market makes two consecutive lows. When the swing direction changes from up to down, the high of the downswing is called a peak and represents resistance.

preliminary 030326 - 25 johncw_97@yahoo.com

Trends
Gann swing[11]
Highest bar of Upswing Start of downswing

Start of Downswing

Start of Upswing Start of Upswing

Lowest bar of downswing

Lowest bar of downswing

preliminary 030326 - 26 johncw_97@yahoo.com

Swing charts
Have implemented swing function that can produce various swing types. There is a minimum of one bar required to figure out the start of a new swing line. Examples Why modified swing line?

preliminary 030326 - 27 johncw_97@yahoo.com

Daily bar chart of DJ-30

preliminary 030326 - 28 johncw_97@yahoo.com

Daily bar chart with swing of DJ-30

Modified swing lines using AmiBroker[10]

preliminary 030326 - 29 johncw_97@yahoo.com

Daily bar chart with swing of DJ-30

preliminary 030326 - 30 johncw_97@yahoo.com

Weekly bar chart of XAU

preliminary 030326 - 31 johncw_97@yahoo.com

Daily bar chart of XAU

preliminary 030326 - 32 johncw_97@yahoo.com

Daily bar chart of XAU


Down bar with close below previous bar low Negative up bar Negative up bar & bearish harami Two bar reversal & bearish engulfing Upswing ends with negative up bar to trend line then down bars

Positive down bar with close above previous bar low Series of up bars followed by pullback to support and then a positive bar Series of down bars to trend line followed by two positive bars

preliminary 030326 - 33 johncw_97@yahoo.com

Info/code for charting programs

1.
2.

Here are a few related(?) references (with some code) that may be interest to others: Metastock:
http://eis.pl/kr/AFM/e-se-Dunnigan_Trend.html http://toronto.tasug.com/CodeSnip.zip

Tradestation:

On Silicion Investor site, there is a discussion subject called Dunnigan's Swing Formulas under the forum Market Trends and Strategies: http://www.siliconinvestor.com/stocktalk/subject.gsp?subjectid=51961

3.

Amibroker:
In the Yahoo Amibroker message group, - message 2098 has Gann Swing Chart code written by Tomasz Janeczko (see AFL library). - message 23815 has an attempt for swing code. - message 27893 has kagi/swing code (see AFL library). - message 29073 has zigzag code based on percentage swing. - message 34064 has swing code with a swing size defined. Cringan, William, Zigzag Targets Technical Analysis of Stocks and Commodities, February 2003 code for programs like Metastock, Tradestation and Amibroker in http://www.traders.com/Documentation/FEEDbk_docs/Archive/022003/TradersTips/TradersTips.html

preliminary 030326 - 34 johncw_97@yahoo.com

Chart Patterns
Following are some examples of chart patterns with modified swing lines added. The examples are taken from various articles that discusses those patterns. Please refer to the articles and references such as Pring[1] and Stevens[8] for more detail.

preliminary 030326 - 35 johncw_97@yahoo.com

Pattern bull flag[12]

Morning star

preliminary 030326 - 36 johncw_97@yahoo.com

Pattern bull flag[12]

Two hammers

preliminary 030326 - 37 johncw_97@yahoo.com

Pattern bear flag[12]


Bearish harami

preliminary 030326 - 38 johncw_97@yahoo.com

Pattern bear flag[12]

Bearish harami cross

preliminary 030326 - 39 johncw_97@yahoo.com

Pattern (long) broadening triangle[13]

preliminary 030326 - 40 johncw_97@yahoo.com

Pattern (short) broadening triangle[13]

preliminary 030326 - 41 johncw_97@yahoo.com

Pattern symmetrical triangle[14]

preliminary 030326 - 42 johncw_97@yahoo.com

Pattern symmetrical triangle[15]

preliminary 030326 - 43 johncw_97@yahoo.com

Pattern symmetrical triangle[15]

preliminary 030326 - 44 johncw_97@yahoo.com

Pattern symmetrical triangle[15]

This is just a weekly view of the previous chart

preliminary 030326 - 45 johncw_97@yahoo.com

Pattern symmetrical triangle[15]

preliminary 030326 - 46 johncw_97@yahoo.com

Pattern symmetrical triangle[15]

preliminary 030326 - 47 johncw_97@yahoo.com

Pattern ascending triangle[16]

preliminary 030326 - 48 johncw_97@yahoo.com

Pattern compact ascending triangle[16]

preliminary 030326 - 49 johncw_97@yahoo.com

Pattern descending triangle[16]

preliminary 030326 - 50 johncw_97@yahoo.com

Pattern descending triangle[16]

preliminary 030326 - 51 johncw_97@yahoo.com

Pattern falling wedge in an uptrend[17]

preliminary 030326 - 52 johncw_97@yahoo.com

Pattern falling wedge in a downtrend[17]

preliminary 030326 - 53 johncw_97@yahoo.com

Pattern a rising wedge in a downtrend[17]

preliminary 030326 - 54 johncw_97@yahoo.com

Pattern a rising wedge in an uptrend[17]

preliminary 030326 - 55 johncw_97@yahoo.com

Pattern head and shoulder[18]

preliminary 030326 - 56 johncw_97@yahoo.com

Pattern inverse head and shoulder[18]

preliminary 030326 - 57 johncw_97@yahoo.com

Pattern symmetrical broadening top[19]

preliminary 030326 - 58 johncw_97@yahoo.com

Pattern ascending broadening top[19]

preliminary 030326 - 59 johncw_97@yahoo.com

Pattern ascending broadening top[19]

This is just a weekly view of the previous chart

preliminary 030326 - 60 johncw_97@yahoo.com

Pattern descending broadening top[19]

preliminary 030326 - 61 johncw_97@yahoo.com

References
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. Pring, Martin, Technical Analysis Explained, McGraw-Hill Trade, 4th ed 2002. Dunnigan, William and Mack, Donald, New blueprints for gains in stocks and grains & One-Way Formula for Trading in Stocks and Commodities, Financial Times Prentice Hall 1997. Staff, Technical Tool Insight: Inside days, Active Traders, January 2003, Volume 4, No. 1, pages 88-89 Hartle, Thom, Opening shots, Active Traders, April 2003, Volume 4, No. 4, pages 36-38. Kira Mccaffrey Brecht, Technical Tool Insight: Outside days, Active Traders Magazine, December 2002, Volume 3, No. 12, pages 86-87. Andrews, Timothy, Outside bars: From concept to strategy, Active Traders Magazine, April 2003, Volume 4, No. 4, pages 40-43. Kira Mccaffrey Brecht, Technical Tool Insight: Gaps, Active Traders Magazine, April 2003, Volume 4, No. 4, pages 82-84. Stevens, Leigh, Essential Technical Analysis: Tools and Techniques to Spot Market Trends , John Wiley & Sons 2002. Pring, Martin, Twice as nice: The two-bar reversal pattern, Active Traders Magazine, March 2003, Volume 4, No. 3, pages 48-51 AmiBroker, http://www.amibroker.com Davis, Paul, Swing trading price and volume, Active Traders, January 2002, Volume 3, No. 1, page 50-57. Bierovic, Tom, Flags by candlelight, Active Traders, January 2002, Volume 3, No. 1, pages 34-38. Hartle, Thom, Broadening Horizons, Active Traders, December 2001, Volume 2, No. 11, pages 38-39. Staff., Technical Tool Insight: Triangle, Active Traders, June 2002, Volume 3, No. 6, pages 86-87. Bierovic, Thomas A., Triangle Trader, Active Traders, August 2002, Volume 3, No. 8, pages 32-37. Bierovic, Thomas A., The ups and downs of triangles, Active Traders, September 2002, Volume 3, No. 9, pages 50-55. Bierovic, Thomas A., Winning with wedges, Active Traders, October 2002, Volume 3, No. 10, pages 30-35. Bierovic, Thomas A., Standing the test of time: The head and shoulders pattern, Active Traders, March 2003, Volume 4, No. 3, pages 42-46. Bierovic, Thomas A., How to trade Broadening Tops, Active Traders, April 2003, Volume 4, No. 4, pages 3235.
preliminary 030326 - 62 johncw_97@yahoo.com

You might also like