
OVERVIEW
A swing chart is a member of a genre of charts normally referred to as reversal charts.The most commonly used reversal chart is the point and figure (P&F) chart, which datesback to the last decade of the nineteenth century and is usually credited to legendarytrader James R. Keene. Other members in the reversal family are the exotic Japanesecharts: renko, kagi, and three-line break charts.
DEFINITIONS
A reversal chart is any chart that filters the raw data in order to accentuate significantpoints of interest while ignoring points of less interest. All technical analysts find peaksand valleys of great interest, while areas of lateral price movements are less interesting.Peaks and valleys are those points of inflection where price directions reverse and theslope of an existing trend changes its arithmetic sign (minus to plus and plus to minus).(See Figure 22.1.)
In this study, we prefer to use Ralph N. Elliott’s original terms to avoid any unneces-
sary confusion with terms used by other swing analysts.
A wave is a single straight diagonal line in the swing chart. Waves are always diago-nal lines with positive or negative slope, never perfectly horizontal or vertical.A peak is the point of intersection between an upward wave on the left and a down-ward wave on the right. This represents a local maximum in the raw data.A valley (or trough) is the point of intersection between a downward wave on theleft and an upward wave on the right. This represents a local minimum in the rawdata.A cycleis a series of adjacent interconnected waves depicting specific price formations.
To convert a sequence of raw tick data or open, high, low, close (OHLC) intervaldata to its corresponding swing data, a swing reversal algorithm is employed in whichtwo user-supplied variables must be initialized: the box size and the reversal amount.
BOX SIZE
Traditionally, the minimum price unit is the smallest fractional price increment bywhich the quote currency (or underlying security) can change. In the currency markets,this increment is a single pip. For example, if the EURUSD currency pair is currentlytrading at 1.2451, a single pip is 0.0001 USD.
There are three cases where a box size greater than one pip might be used. Thefirst is when the parity rate between two currencies is very wide and causes a verylarge bid/ask spread. For example, if the bid/ask spread (transaction cost) for theEURCZK currency pair is 350 koruny, then a one-pip box size will have very negligi-ble filtering power.
A second reason for using a box size greater than one pip occurs when performinghistorical analysis and a longer time frame is being analyzed. In this case, the analystwill probably be scrutinizing major reversals and may have little interest in minor rever-sals. This pertains more to position traders than session or day traders.
Lastly, a larger box size may be used in order to align peaks and valleys with the gridlines of the chart. This is purely a display preference, though.
REVERSAL AMOUNT
The reversal amount is the number of boxes necessary to plot a reversal in price direc-tion. For instance, if the current trend is upward and the reversal amount is set at three
boxes, then a decline of three box units must be reached before the downward move-ment is plotted. If, instead, a new price continues in the direction of the existing trend,then single boxes are automatically added to the last extreme.
boxes, then a decline of three box units must be reached before the downward move-ment is plotted. If, instead, a new price continues in the direction of the existing trend,then single boxes are automatically added to the last extreme.
It is the mutual interaction between the box size and the reversal amount that trig-gers the reversal mechanism in the swing algorithm necessary to plot peaks and valleyswhile ignoring lateral price movements.
There is one final case for increasing the box size. If an analyst, for whatever rea-son, has become very partial to one specific reversal amount, it is possible to increasethe box size instead of the reversal amount when market conditions change.
For example, a three-box reversal amount is favored by many traders. If traderswish to filter out some of the minor swings, they can increase either the reversal amountor the box size. However, keep in mind that although a two-pip box size with a three-box reversal amount algorithm will generate results very similar to a one-pip box sizewith a six-box reversal amount algorithm, they will not be identical. This requires somereflection. The reason is that, when plotting a continuation of an existing trend, smallerdistances can be plotted when a smaller box size is used.
SWING REVERSAL ALGORITHM
Given this information and these user-supplied variables, we now define the swing re-versal algorithm as follows (this algorithm assumes we are using daily OHLC quotes asthe input data rather than simply the closing prices):
Step 1: Initialize BoxSize and ReversalAmount variables.Step 2: Create a new variable called Direction.Step 3: Create two array variables called Price and Time to hold the swing data.Step 4: Set Price(1) = Close(1) and Time(1) = 1.Step 5: If High(2) – Price(1) > BoxSize * ReversalAmount Then
Set Price(2) = High(2)
Set Time(2) = 2
Set Direction = UP
ElseIf Price(1) – Low(2) > BoxSize * ReversalAmount Then
Set Price(2) = Low(2)
Set Time(2) = 2
Set Direction = DOWN
Else
Increment day number and repeat Step 5
End IfStep 6: Increment DayNo
If DayNo = Number of OHLC quotes Then
Go to Step 9
Absol uteMmn
127
If Direction = DOWN Then
Go to Step 8
End IfStep 7:If High(DayNo) – Price(Idx) > BoxSize Then
Set Price(Idx) = High(DayNo)
Set Time(Idx) = DayNo
ElseIf Price(Idx) – Low(DayNo) > BoxSize * ReversalAmount Then
Increment Swing Idx
Set Price(Idx) = Low(DayNo)
Set Time(Idx) = DayNo
Set Direction = DOWN
End If
Go to Step 6Step 8:If High(DayNo) – Price(Idx) > BoxSize * ReversalAmount Then
Increment Swing Idx
Set Price(Idx) = High(DayNo)
Set Time(Idx) = DayNo
Set Direction = UP
ElseIf Price(Idx) – Low(DayNo) > BoxSize Then
Set Price(Idx) = Low(DayNo)
Set Time(Idx) = DayNo
End If
Go to Step 6Step 9:Set Number of Swings = Swing Idx
Exit
At this point the two swing arrays Price() and Time() have been populated with cor-responding pairs of swing data. The complete code for this algorithm written in Mi-crosoft Visual Basic 6.0 is provided in Appendix P.
Step 1: Initialize BoxSize and ReversalAmount variables.Step 2: Create a new variable called Direction.Step 3: Create two array variables called Price and Time to hold the swing data.Step 4: Set Price(1) = Close(1) and Time(1) = 1.Step 5: If High(2) – Price(1) > BoxSize * ReversalAmount Then
Set Price(2) = High(2)
Set Time(2) = 2
Set Direction = UP
ElseIf Price(1) – Low(2) > BoxSize * ReversalAmount Then
Set Price(2) = Low(2)
Set Time(2) = 2
Set Direction = DOWN
Else
Increment day number and repeat Step 5
End IfStep 6: Increment DayNo
If DayNo = Number of OHLC quotes Then
Go to Step 9
Absol uteMmn
127
If Direction = DOWN Then
Go to Step 8
End IfStep 7:If High(DayNo) – Price(Idx) > BoxSize Then
Set Price(Idx) = High(DayNo)
Set Time(Idx) = DayNo
ElseIf Price(Idx) – Low(DayNo) > BoxSize * ReversalAmount Then
Increment Swing Idx
Set Price(Idx) = Low(DayNo)
Set Time(Idx) = DayNo
Set Direction = DOWN
End If
Go to Step 6Step 8:If High(DayNo) – Price(Idx) > BoxSize * ReversalAmount Then
Increment Swing Idx
Set Price(Idx) = High(DayNo)
Set Time(Idx) = DayNo
Set Direction = UP
ElseIf Price(Idx) – Low(DayNo) > BoxSize Then
Set Price(Idx) = Low(DayNo)
Set Time(Idx) = DayNo
End If
Go to Step 6Step 9:Set Number of Swings = Swing Idx
Exit
At this point the two swing arrays Price() and Time() have been populated with cor-responding pairs of swing data. The complete code for this algorithm written in Mi-crosoft Visual Basic 6.0 is provided in Appendix P.
TIME ALIGNMENT
Adherents of the point and figure charting method believe that the compression oftime along the x-axis is an advantage since the trader can then focus solely on pricemovements. Proponents of swing charts, by contrast, are more comfortable viewingthe points of inflection (peaks and valleys) as they occur in real time. When a swingchart is displayed directly below an OHLC bar chart, the respective peaks and valleysalign vertically with the corresponding bar above. Swing charts also display the ve-
locity of the market; that is, the slope of each wave determines how quickly the mar-
ket is moving.
The P&F chart versus swing chart debate is, in the final analysis, a matter of prefer-ence. Any swing chart can be readily massaged into a P&F chart by simply convertingthe straight lines to columns of Xs and Os. The converse, however, is not possible sinceP&F charts do not normally record the day numbers at the reversal vertices. We preferthe swing chart because in later chapters the number of time units in each wave will beused in numerous mathematical calculations.
locity of the market; that is, the slope of each wave determines how quickly the mar-
ket is moving.
The P&F chart versus swing chart debate is, in the final analysis, a matter of prefer-ence. Any swing chart can be readily massaged into a P&F chart by simply convertingthe straight lines to columns of Xs and Os. The converse, however, is not possible sinceP&F charts do not normally record the day numbers at the reversal vertices. We preferthe swing chart because in later chapters the number of time units in each wave will beused in numerous mathematical calculations.
PRACTICAL EXAMPLES
In the four swing charts shown in Figures 22.2 through 22.5, the box size is set to onepip while four different reversal amounts (3, 6, 9, and 12 boxes) are employed.
As stated earlier, the number of waves generated by the swing algorithm has an inverse relationship with the reversal amount (that is, as the reversal amount increases, the number of waves decreases and vice versa). Using the EURUSD currency pair for the time frame specified above, this equates to what is shown inTable 22.1.
As stated earlier, the number of waves generated by the swing algorithm has an inverse relationship with the reversal amount (that is, as the reversal amount increases, the number of waves decreases and vice versa). Using the EURUSD currency pair for the time frame specified above, this equates to what is shown inTable 22.1.
COMPOSITE SWING CHARTS
Figure 22.6, an aggregate of the previous four swing charts, is included here so traderscan conceptually scrutinize the effect of different reversal amounts when using thesame OHLC data.
USAGEThe advantage of comparing identical raw data time frames using different reversalamounts in twofold. Any time traders view a single data set from different perspectives,there is a greater likelihood of discovering one particular nuance in one of the chartsthat may not be readily apparent in the sibling charts (more is better).
Additionally, several trading systems are based on specific swing patterns, such asElliott cycles and others in later chapters in this book. Many of these systems generate adiscrete price estimate or at least predict price direction. Systematically varying the
reversal amount allows traders to compare and log the forecasts at different levels,which adds an additional tier of reliability in the signal confirmation mechanism.
For those traders who home-brew their own trading programs, we have includedthe Microsoft Visual Basic source code for the swing reversal algorithm in Appendix P.This source code converts OHLC interval data to swing data. It is a relatively simpleprocess to create an analogous function that converts raw tick data (close only) toswing data.
USAGEThe advantage of comparing identical raw data time frames using different reversalamounts in twofold. Any time traders view a single data set from different perspectives,there is a greater likelihood of discovering one particular nuance in one of the chartsthat may not be readily apparent in the sibling charts (more is better).
Additionally, several trading systems are based on specific swing patterns, such asElliott cycles and others in later chapters in this book. Many of these systems generate adiscrete price estimate or at least predict price direction. Systematically varying the
reversal amount allows traders to compare and log the forecasts at different levels,which adds an additional tier of reliability in the signal confirmation mechanism.
For those traders who home-brew their own trading programs, we have includedthe Microsoft Visual Basic source code for the swing reversal algorithm in Appendix P.This source code converts OHLC interval data to swing data. It is a relatively simpleprocess to create an analogous function that converts raw tick data (close only) toswing data.
No comments:
Post a Comment