HomeFreeGr8Harmonic indicator for Stockfinder

Harmonic trading is still relatively unknown to most traders. Although the fundamentals of Harmonic patterns have been used and applied to the markets for a long time, initially covered and published by H.M. Gartley in the late ‘30’s.

I’m not going to much into the details of harmonics, I assume you understand the concept. If not, read up first. There are several books available, and with some googling you will find more information as well.

The basic pattern of Harmonics is the AB=CD pattern.

click image to enlarge

An initial leg A to B, subsequently followed by a Pullback to a point C. Point C is defined to be a minimum of 38.2% to a maximum of 88.6% retrace of the A to B leg.

Depending on the “depth” of the point C pullback, we can calculate a set of targets, where the C to D leg is expected to finish. This target area is known as the PRZ, Potential Reversal Zone.

My indicators are derivatives of the indicators you will see discussed in publications, and the well-known gartley pattern. I personally use 3 targets. One of the three targets is independent of the depth of the pullback; Point D is the exact range from point A to point B, added (or subtracted in case of a Bullish AB=CD) to (from) point C in case of a Bearish AB=CD pattern. The other two targets are calculated based on Fibonacci sequences, see table.

PRZ

My vision of harmonics is that it provides a framework in which price adheres to certain levels within the framework, and each level to some extend depends on another level, the dependency is a relation as set out by Fibonacci ratios. To practice and get a feel for detecting AB=CD patterns download the free excel application here.

In addition to the AB=CD PRZ targets, I have included another point; point X, in order to find XABCD patterns.

In the previous two examples the AB=CD was superseded by another leg, that as definition has the rule to be higher than point B in case of a bearish pattern (lower than point B, in case of a bullish pattern).

Now we see that XA retracements and projections have significance as well. In case of the bullish pattern, the start of the PRZ is inline with 50% XA retracement, and price reversed back through the PRZ after a quick touch of the 61.8%XA retracement.

In case of the bearish pattern, we see that price quickly touched the 127%XA projection, before reversing out of its AB=CD PRZ.

Currently, the best and most prominent example of harmonic patterns is the monthly SPY chart. A start of a possible CD leg higher was alerted back in October of 2011. The top of the AB=CD PRZ, proofed to be resistance for no more then two months, before it broke and as result climbed up to the 161.8%XA projection.

On the daily chart the 161.8%XA of this monthly chart became a point A, of a Bullish XABCD pattern, of which the start of the CD leg resulted in the correction. this was discussed in detail here, BEFORE the decline.

Lo and behold the CD leg came down on the daily chart in a 200%XA projection exactly to the 127%XA of the monthly chart.

SPY-monthly

This is a scenario I often trade on small timeframes with weekly options: wait until a larger pattern reaches its PRZ, or major projection, and then look on smaller timeframes for a new setup.

How does the indicator work:

Most of the implementations I have seen, look for a completed pattern, upon which price is predicted to react.

I have entered a slightly different path, by looking for patterns that are in progress, and then by using the Fibonacci relationships to predict where price has the possibility of moving, in order to complete the pattern. Specifically the indicator looks for setups where a start of a CD leg of an AB=CD pattern is likely to begin. At which time the indicator plots the AB=CD PRZ (Potential Reversal Zone), as well as XA retrace levels and projections.

here’s an example of the indicator in acion:

Get Adobe Flash player

working with the indicator 

The indicators and conditions have several “userinput” parameters, in which we can change settings that will change the behavior of the indicator/condition.

clicking on the indicator on top of the screen pulls up a window, in which in the top right corner you’ll see the parameters:

XABCD-userinput

EntryMsg : If changed to a value of “1” , then a popup message shows up everytime a ticker in your watch lists surpasses the “entry” for possible start of a CD leg. Leaving it to value “0” disables the popup message.

Zoom: if set to value “0”, then it won’t show previous patterns if you move the Y-axis back in time, it’ll only show the most recent pattern. A value of “1” will allow plotting previous patterns. Can be left at 1.

XAextensions: Determines which XA extensions will be plotted. the 38.2, 50, and 61.8% will always be plotted as default, as long as point B is lower than any of these retrace levels. optionally the following levels will be plotted if a 1 value is entered in its position:

78.6%, 88.6%, 113%, 127%, 161.8%, 200%, 224%, 261.8%

I prefer to plot 78.6 through 161.8, which translates to a 1,1,1,1,1,0,0,0 sequence as shown above.

Xqualifier : The minimum percentage decline of the XA leg prior to Point X, in order to qualify X. I modify this sometimes between roughly 30 and 45%.

PatternInputs:

200 : the amount of bars the indicator uses in which to find a pattern.

20 : the minimum amount of bars, prior to Bar A that all have a higher low then Bar A.

35 : The minimum required retrace of AB before point C can be qualified. I mentioned 38.2% to be the minimum, so I leave this setting slightly below that, to allow a little wiggle room.

23.6 : Percentage of AB range, added/subtracted to/from point C to determine “entry” level

You might want to turn of or on the “Contributes to scaling” toggle button.in order to show all selected projection levels at once on the chart.

the conditions have similar settings. The conditions are the little blue and orange bubbles on the bottom of your chart, and can be used to scan your watchlist. make sure the settings correspond to the settings on the indicator.

rightclick on the bubble, and select edit. The settings are the same, except for the EntryMsg option. This one will control whether or not audible alerts are enabled or not.

Make sure you have copied the “wav” folder to your c:\SFV5 folder.

this folder holds a multitude of wav soundfiles, which I have created with a utility called “TextToWav”, which you can download here

Type in text into the program, and it’ll create a soundfile.

I have created sound files for the tickers on my watchlist. If you want more, you can easily create them yourself. quick video on how to do it (this is an old recording, with the recent indicator the folder has been changed to C:\SFV5)

and the result:  (used “market replay” to get an entry brk on COST)

Make sure you create two files, one for “up” and one for “down” triggers.

Name the “up” files the exact ticker symbol, follwed by -up.wav.  so Apple would be : AAPL-up.wav, for the up trigger, and AAPL-down.wav for the down trigger. You do not have to make sound files, if the file for the ticker does not exist, it will play a default “chime” sound file.

Final Notes

Scanning of a watchlist is pretty CPU intensive. rightclick on the sort column in the watchlist; the update frequency is set to 5seconds. that means every 5 seconds the code goes over every single bar for every ticker in your watchlist and calculates the indicators, so that’s a lot of calculations. If you only use larger timeframes, you could probably change this setting to a less frequent update.

Another setting that effects performance is the menu-settings-data Manager. At default Stockfinder uses 5000 daily bars, and 5000 intraday bars. Although this might be interesting for scrolling your charts back, and see how the indicators worked in the past. for active use during the day, you really don’t need that much data. I have it set to 600 daily bars and 400 intraday bars.

Personally I have four monitors, and I have created three window frames with a total of 12 charts, and one watchlist. But I also have a very powerful computer, that is overclocked and runs at 4.8Ghz.

But with any decent, recent computer you should be able to run at least 4 charts.

 

 

 


Comments

Gr8Harmonic indicator for Stockfinder — 7 Comments

  1. great write up Peter, appreciate all that you do.
    I’m still not sure what Xqualifier is; does it mean that for the XA leg to be qualified, needs to be more than 30-45% retrace of the leg before it?
    Also in the video, for the orange CD leg with entry just below close, is it close enough to enter?
    Thanks!

    • Correct on the Xqualifier. it needs to adhere to three conditions: 1- it has to surpass point B, obviously. and 2- B should be minimum of 38.2% retrace of X (I use 35%). and 3- to find X as an anchor point, the code looks for the leg superseding XA, to be a minimum “y” percentage of XA. I usually use 35%, although I kept it as a userdefined variable, so I can modify it.
      It gets hairy, I know.. 🙂

        • till the start of time. Which in Stockfinder is limited to the “number of bars” setting. I use 450 bars. So the indicator, once it has determined a possible X point will, from that point, “walk” through the bars back to the first bar, to see if it can qualify point X.

    • I still don’t have a real clear definition of whether to take a trade at “entry”. I think you should look at confirmation of other indicators at that point. I like to use TD-pressure. Others might like RSI, or something else. Another idea is to use TD-Qualifiers by Demark.

Leave a Reply

Your email address will not be published. Required fields are marked *