62
preliminary 030326 - 1 [email protected] Bar chart with swing lines Toronto TASUG March 2003

Bar Swing Chart

Embed Size (px)

Citation preview

Page 1: Bar Swing Chart

preliminary 030326 - 1 [email protected]

Bar chart with swing lines

Toronto TASUG March 2003

Page 2: Bar Swing Chart

preliminary 030326 - 2 [email protected]

OHLC Bar

• Bar is represented by 4 elements

High

Close

Low

Open

range = high - low

Page 3: Bar Swing Chart

preliminary 030326 - 3 [email protected]

Bar classification[1][2]

• 1. Up bar

The bar on the right is called an“UP” bar. It has a higher high anda higher low than the previous bar.

Open and close positions do notmatter.

Page 4: Bar Swing Chart

preliminary 030326 - 4 [email protected]

Bar classification

• 2. Down bar

The bar on the right is called an“DOWN” bar. It has a lower highand a lower low than the previousbar.

Open and close positions donot matter.

Page 5: Bar Swing Chart

preliminary 030326 - 5 [email protected]

Bar classification

• 3. Inside bar

The bar on the right is called an“INSIDE” bar. It has a lower highand a higher low than the previousbar or simply its trading range is insidethat 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 topush beyond the previous day’s range. This behavior suggests the marketis ‘undecided’ about direction.”[3] “Narrow-range bars and inside barsrepresent short-term volatility lows out of which price can move sharply.”[4]

Page 6: Bar Swing Chart

preliminary 030326 - 6 [email protected]

Bar classification

• 4. Outside bar

The bar on the right is called an“OUTSIDE” bar. It has a higher highand a lower low than the previousbar or simply the trading range isoutside 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 factorsas the relationship of the bar’s closing price to the opening price and currenttrend. Some traders interpret outside days as signals of either continuationmoves (i.e. those in the same direction of the trend) or reversals, dependingon these factors.”[5] “Outside bars can provide potential entry signals, if youknow what to look for – and what to look out for.” [6]

Page 7: Bar Swing Chart

preliminary 030326 - 7 [email protected]

Bar classification

• 5. Neutral/borderline bar*

The bar on the right is an example ofa “NEUTRAL” bar. It is a bar that doesnot fall into the other previously definedclassifications. Basically either thehigh or low is the same as theprevious bar.

Open and close positions do notmatter.

* Some people may relaxed definitions such that these bars may be includedin the previous four classification.For the example above, some may consider it to be a down bar or maybe anoutside bar.

Page 8: Bar Swing Chart

preliminary 030326 - 8 [email protected]

Bar summary

1. outsidebar = H > Ref( H, -1 ) AND L < Ref( L, -1 );

2. insidebar = H < Ref( H, -1 ) AND L > Ref( L, -1 );

3. upbar = H > Ref( H, -1 ) AND L > Ref( L, -1 );

4. downbar = L < Ref( L, -1 ) AND H < Ref( H, -1 );

5. neutralbar is one that does not match any of the aboveor

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

Page 9: Bar Swing Chart

preliminary 030326 - 9 [email protected]

Bar summary

• An alternative (without neutral bar):1. outsidebar = H > Ref( H, -1 ) AND L < Ref( L, -1 );

2. insidebar = H <= Ref( H, -1 ) AND L >= Ref( L, -1 );

3. upbar = H > Ref( H, -1 ) AND L >= Ref( L, -1 );

4. downbar = L < Ref( L, -1 ) AND H <= Ref( H, -1 );

Page 10: Bar Swing Chart

preliminary 030326 - 10 [email protected]

Who is in control?

• In general, one can tell how bullish or bearish a bar is by looking at factors such as:

1. The closing price versus the open price.

2. The closing price versus the previous close.

3. The position of the closing price within the range of the bar.

4. The size of the range versus the previous bars.

5. The volume traded.

6. Gaps[7] within the chart.

Page 11: Bar Swing Chart

preliminary 030326 - 11 [email protected]

Control example

• Bearish example

Series of three up bars. First two are positive orbullish (open > close) and the next is negativeor bearish (close < open).

One would expect that price would belower 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 belowthe close of 3 bars ago

Page 12: Bar Swing Chart

preliminary 030326 - 12 [email protected]

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.

Page 13: Bar Swing Chart

preliminary 030326 - 13 [email protected]

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.

Page 14: Bar Swing Chart

preliminary 030326 - 14 [email protected]

Colour bar chart

• One can assign colours to the bars 1. Up bars green

2. Down bars red

3. Inside bars yellow

4. Outside bars blue

5. Neutral bars white

Page 15: Bar Swing Chart

preliminary 030326 - 15 [email protected]

Daily bar chart of DJ-30

Page 16: Bar Swing Chart

preliminary 030326 - 16 [email protected]

Daily bar chart of DJ-30

Colour bars using AmiBroker[10]

Page 17: Bar Swing Chart

preliminary 030326 - 17 [email protected]

Daily candlestick chart of DJ-30

Page 18: Bar Swing Chart

preliminary 030326 - 18 [email protected]

Daily candlestick chart of DJ-30

Colour candlesticks using AmiBroker[10]

Page 19: Bar Swing Chart

preliminary 030326 - 19 [email protected]

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.

Page 20: Bar Swing Chart

preliminary 030326 - 20 [email protected]

Trends

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

Page 21: Bar Swing Chart

preliminary 030326 - 21 [email protected]

Trends

According to Dunnigan[2]:• An Upswing starts when a bar’s 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.

Page 22: Bar Swing Chart

preliminary 030326 - 22 [email protected]

Trends

According to Dunnigan[2]:• A Downswing starts when a bar’s 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.

Page 23: Bar Swing Chart

preliminary 030326 - 23 [email protected]

Trends

• Dunnigan swing[2]

Lowest bar of downswing

Start of Upswing

Start of Downswing

Highest bar of Upswing Start of downswing

Lowest bar of downswing

Start of Upswing

Page 24: Bar Swing Chart

preliminary 030326 - 24 [email protected]

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.

Page 25: Bar Swing Chart

preliminary 030326 - 25 [email protected]

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.

Page 26: Bar Swing Chart

preliminary 030326 - 26 [email protected]

Trends

• Gann swing[11]

Lowest bar of downswing

Start of Upswing

Start of Downswing

Highest bar of UpswingStart of downswing

Lowest bar of downswing

Start of Upswing

Page 27: Bar Swing Chart

preliminary 030326 - 27 [email protected]

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?

Page 28: Bar Swing Chart

preliminary 030326 - 28 [email protected]

Daily bar chart of DJ-30Daily bar chart of DJ-30

Page 29: Bar Swing Chart

preliminary 030326 - 29 [email protected]

Daily bar chart with swing of DJ-30

Modified swing lines using AmiBroker[10]

Page 30: Bar Swing Chart

preliminary 030326 - 30 [email protected]

Daily bar chart with swing of DJ-30

Page 31: Bar Swing Chart

preliminary 030326 - 31 [email protected]

Weekly bar chart of XAU

Page 32: Bar Swing Chart

preliminary 030326 - 32 [email protected]

Daily bar chart of XAU

Page 33: Bar Swing Chart

preliminary 030326 - 33 [email protected]

Daily bar chart of XAU

Two bar reversal & bearish engulfing

Negative up bar & bearish harami

Negative up bar

Down bar with close below previous bar low

Positive down bar withclose above previousbar low

Series of down bars to trend line followed bytwo positive bars

Series of up bars followed bypullback to support and thena positive bar

Upswing ends with negativeup bar to trend line thendown bars

Page 34: Bar Swing Chart

preliminary 030326 - 34 [email protected]

Info/code for charting programs• Here are a few related(?) references (with some code) that may

be interest to others:1. Metastock:

http://eis.pl/kr/AFM/e-se-Dunnigan_Trend.htmlhttp://toronto.tasug.com/CodeSnip.zip

2. 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

Page 35: Bar Swing Chart

preliminary 030326 - 35 [email protected]

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.

Page 36: Bar Swing Chart

preliminary 030326 - 36 [email protected]

Pattern – bull flag[12]

Morning star

Page 37: Bar Swing Chart

preliminary 030326 - 37 [email protected]

Pattern – bull flag[12]

Two hammers

Page 38: Bar Swing Chart

preliminary 030326 - 38 [email protected]

Pattern – bear flag[12]

Bearish harami

Page 39: Bar Swing Chart

preliminary 030326 - 39 [email protected]

Pattern – bear flag[12]

Bearish harami cross

Page 40: Bar Swing Chart

preliminary 030326 - 40 [email protected]

Pattern – (long) broadening triangle[13]

Page 41: Bar Swing Chart

preliminary 030326 - 41 [email protected]

Pattern – (short) broadening triangle[13]

Page 42: Bar Swing Chart

preliminary 030326 - 42 [email protected]

Pattern – symmetrical triangle[14]

Page 43: Bar Swing Chart

preliminary 030326 - 43 [email protected]

Pattern – symmetrical triangle[15]

Page 44: Bar Swing Chart

preliminary 030326 - 44 [email protected]

Pattern – symmetrical triangle[15]

Page 45: Bar Swing Chart

preliminary 030326 - 45 [email protected]

Pattern – symmetrical triangle[15]

This is just a weekly view of the previous chart

Page 46: Bar Swing Chart

preliminary 030326 - 46 [email protected]

Pattern – symmetrical triangle[15]

Page 47: Bar Swing Chart

preliminary 030326 - 47 [email protected]

Pattern – symmetrical triangle[15]

Page 48: Bar Swing Chart

preliminary 030326 - 48 [email protected]

Pattern – ascending triangle[16]

Page 49: Bar Swing Chart

preliminary 030326 - 49 [email protected]

Pattern – compact ascending triangle[16]

Page 50: Bar Swing Chart

preliminary 030326 - 50 [email protected]

Pattern – descending triangle[16]

Page 51: Bar Swing Chart

preliminary 030326 - 51 [email protected]

Pattern – descending triangle[16]

Page 52: Bar Swing Chart

preliminary 030326 - 52 [email protected]

Pattern – falling wedge in an uptrend[17]

Page 53: Bar Swing Chart

preliminary 030326 - 53 [email protected]

Pattern – falling wedge in a downtrend[17]

Page 54: Bar Swing Chart

preliminary 030326 - 54 [email protected]

Pattern – a rising wedge in a downtrend[17]

Page 55: Bar Swing Chart

preliminary 030326 - 55 [email protected]

Pattern – a rising wedge in an uptrend[17]

Page 56: Bar Swing Chart

preliminary 030326 - 56 [email protected]

Pattern – head and shoulder[18]

Page 57: Bar Swing Chart

preliminary 030326 - 57 [email protected]

Pattern – inverse head and shoulder[18]

Page 58: Bar Swing Chart

preliminary 030326 - 58 [email protected]

Pattern – symmetrical broadening top[19]

Page 59: Bar Swing Chart

preliminary 030326 - 59 [email protected]

Pattern – ascending broadening top[19]

Page 60: Bar Swing Chart

preliminary 030326 - 60 [email protected]

Pattern – ascending broadening top[19]

This is just a weekly view of the previous chart

Page 61: Bar Swing Chart

preliminary 030326 - 61 [email protected]

Pattern – descending broadening top[19]

Page 62: Bar Swing Chart

preliminary 030326 - 62 [email protected]

References1. Pring, Martin, “Technical Analysis Explained”, McGraw-Hill Trade, 4 th ed 2002.2. 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.3. Staff, “Technical Tool Insight: Inside days”, Active Traders, January 2003, Volume 4, No. 1, pages 88-894. Hartle, Thom, “Opening shots”, Active Traders, April 2003, Volume 4, No. 4, pages 36-38.5. Kira Mccaffrey Brecht, “Technical Tool Insight: Outside days”, Active Traders Magazine, December 2002,

Volume 3, No. 12, pages 86-87.6. Andrews, Timothy, “Outside bars: From concept to strategy”, Active Traders Magazine, April 2003, Volume 4,

No. 4, pages 40-43.7. Kira Mccaffrey Brecht, “Technical Tool Insight: Gaps”, Active Traders Magazine, April 2003, Volume 4, No. 4,

pages 82-84.8. Stevens, Leigh, “Essential Technical Analysis: Tools and Techniques to Spot Market Trends ”, John Wiley &

Sons 2002.9. Pring, Martin, “Twice as nice: The two-bar reversal pattern”, Active Traders Magazine, March 2003, Volume 4,

No. 3, pages 48-5110. AmiBroker, http://www.amibroker.com11. Davis, Paul, “Swing trading price and volume”, Active Traders, January 2002, Volume 3, No. 1, page 50-57.12. Bierovic, Tom, “Flags by candlelight”, Active Traders, January 2002, Volume 3, No. 1, pages 34-38.13. Hartle, Thom, “Broadening Horizons”, Active Traders, December 2001, Volume 2, No. 11, pages 38-39.14. Staff., “Technical Tool Insight: Triangle”, Active Traders, June 2002, Volume 3, No. 6, pages 86-87.15. Bierovic, Thomas A., “Triangle Trader”, Active Traders, August 2002, Volume 3, No. 8, pages 32-37.16. Bierovic, Thomas A., “The ups and downs of triangles”, Active Traders, September 2002, Volume 3, No. 9,

pages 50-55.17. Bierovic, Thomas A., “Winning with wedges”, Active Traders, October 2002, Volume 3, No. 10, pages 30-35.18. Bierovic, Thomas A., “Standing the test of time: The head and shoulders pattern”, Active Traders, March

2003, Volume 4, No. 3, pages 42-46.19. Bierovic, Thomas A., “How to trade Broadening Tops”, Active Traders, April 2003, Volume 4, No. 4, pages 32-

35.