RegisterLogin  
 Search
 
 
Thinking Stuff
Automated Trading Software
Automated trading is no longer just for the rich or nerdy. Our revolutionary software uses your trading rules, but none of your emotions. There's just one requirement - you know how to use a mouse.
  

You are here: Resources » Articles » Average Pullback Histogram Normal layoutMedium LayoutLarge Layout Normal TextMedium TextLarge Text
 
Average Pullback Histogram
First, I came up with this independently, but if you know someone else has already published it or something very similar, please let me know so I can give the appropriate credit.

Second, if you publish it then give me the appropriate credit. A link to this page or website certainly couldn't hurt.

Third, I've given you this indicator and how to calculate it for free. In the spirit of "you get back what you give out". If you come up with a decent way to trade with it, or a way to change it to make it better, you must leave a comment on this page detailing it. There's no being a Scrooge. In fact, it doesn't make sense - more people following your system will result in more people buying when you are buying, which should theoretically mean better results.

Fourth, comments and criticisms are welcomed. Please use the Contact Us page.

---

Background

I was looking into using some aspect of the previous bar's range as a stop loss. And then I thought I should calculate exactly how far the price normally dips back into the previous bar on an upward march.

On an upward march, the price normally does dip back into the previous bar's range, doesn't it? And that's perfectly normal behaviour on an upward march, so you don't want to bring your stops too close.

And sometimes the price actually goes lower than the low of the previous bar, only to continue its upward march. So blindly using the low of the previous bar as a moving stop, while still a solid rule, could potentially be made better. Or just more complicated - that's where your backtesting comes in to decide if these extra calculations are worthwhile.

But, sometimes the price goes lower than the low of the previous bar, and then continues going down. That's the turning point of the trend.

Anyway, I think I discovered that the amount that the price dips into the previous bar's range while continuing an existing trend jumps around all over the shop.

But, what I stumbled across, was an indicator based on how far the price "pulls back" into the previous bar's range.


Theory

A pullback into a previous bar's range depends on whether this is an uptrend or downtrend.

In an uptrend, the pullback is determined by how far the low of the current bar went below the high of the previous bar.

In a downtrend, the pullback is determined by how far the high of the current bar went above the low of the previous bar.

Make sense? Look at a chart. I've been a bit lazy and not provided one.

So we don't have to work out if we are in an uptrend or downtrend, we calculate both.

Ok, so first get:
1. Current High
2. Current Low
3. Previous High
4. Previous Low

Then calculate "Upward" as equal to Previous High minus Current Low. That's how far the low of today pulled back into the range of the previous bar.
5. Upward = Previous High - Current Low

This number will be positive if in fact the low did indeed pull back into the previous bar's range. And the more it pulled back, the bigger the number.

And calculate "Downward" as equal to Previous Low minus Current High, and then multiply that result by -1. This is for how far the high of today pulled back into the range of the previous bar.
6. Downward = (Previous Low - Current High) * -1

This number will be positive if in fact the high did indeed pull back into the previous bar's range. And the more it pulled back, the bigger the number.

You want these numbers in terms of pips, so if it's a currency with 4 decimal places like EURUSD, then multiply both of those numbers by 10000, and if it's a currency with 2 decimal places like USDJPY, then multiply both of those numbers by 100.

Now, one calculation of Upward or Downward really doesn't give us much to go with. As I said, they'll be all over the shop. So get a whole bunch of such calculations, and take an average. An average of period 20 sounds good enough. Or 10. Or whatever.

7. So the average of Upward becomes UpAverage.
8. And the average of Downward becomes DownAverage.

And here's where things become kind of hazy. I made this so long ago (but haven't actually used it, instead focusing on finishing the software) that all I can remember is that charts of those averages were very bumpy indeed. They needed to be smoothed.

So smooth them, by taking an average of each of the averages. Again, the period could be 10 or 20 or something.

I probably lost a lot of people just then :-) "Averages of averages!? Why I never". If it works then who cares?

9. The average of UpAverage becomes SmoothedUp.
10. And the average of DownAverage becomes SmoothedDown.

Then, we calculate what I will call the Main Line, and this equals SmoothedUp minus SmoothedDown. That's where the "histogram" part of the name comes in. Which could be incorrect terminology, but again I'm not much of a caring sort.
11. Main Line = SmoothedUp - SmoothedDown

But, here's where I lose some more people, because that line was again too rough. So *gulp* smooth it by taking an average of the Main Line.

12. The average of the Main Line becomes the Average Pullback Histogram.

These calculations are very roughly similar to the MACD Histogram, only the MACD starts off with taking averages of the closing price instead of averages of the pullback amount, and I have one more smoothing step than the MACD.

All that gives us a single line which rises above, and falls below zero (the top chart is the actual price).

Average Pullback Histogram



Interpretation

If you remember, the bigger the pullback, the bigger the Upward and/or Downward calculation becomes.

And also, if you remember, we calculate the Main Line by subtracting SmoothedDown from SmoothedUp. So if SmoothedUp was very big, and SmoothedDown small, then the Main Line would be a positive number. And hopefully you can see, because this is the tricky part, that a positive number means we are in a downtrend.

Because the bigger the pullback, the bigger Upward, therefore the bigger SmoothedUp, therefore the bigger the Main Line value. And a big pullback into the upward direction means the price is heading down.

And in reverse, if SmoothedDown was much larger than SmoothedUp, the Main Line will be negative, and it means we are in an uptrend.


Trading Ideas

The basic idea is that when the Upwards pullback overtakes the Downwards pullback, the trend has changed to a downtrend (you've wrapped your head around the fact that Upwards pullback means going down, right?).

The following are just ideas, and the charts just examples. On the charts provided you can see that some ideas work, and some don't. But, that's just for that particular currency and timeframe. You would need to experiment yourself with a stop-loss technique, and with your financial instrument and time-frame of choice.

---

The point at which we can say that one pullback has overtaken another in strength is where the chart equals zero. So, one trading idea is to go long when the Average Pullback Histogram (AVPBH) goes from above zero to below zero. Go short when the AVPBH goes from below zero to above.

Average Pullback Histogram

---

Instead of zero, you could say go long when the AVPBH falls below a certain point on the chart. And go short when the AVPBH goes above a certain point on the chart.

Average Pullback Histogram

---

Instead of going long when the AVPBH goes from positive to negative, just allow a long entry whenever the AVPBH is below zero. And allow short entries whenever the AVPBH is above zero. And then use some other entry rule to decide the precise time of entry.

---

Instead of rising and falling above zero, it could also be argued that one pullback is overtaking another in strength when a peak or trough is formed.

Go long when a peak is formed, short when a trough is formed.

Average Pullback Histogram

You can see that the lines are just a little the right of the peaks and troughs. It's because you don't know if it's a peak or trough until the peak or trough has actually formed.

---

Not just a peak, but go long when a peak is formed and the AVPBH is negative. And go short when a trough is formed and the AVPBH is positive.

---

Or, go long when a peak is formed and the AVPBH is positive. And go short when a trough is formed and the AVPBH is negative. Yes, the opposite of above! Who cares! Backtest to see which one works!

---

Or, go long when a lower peak is formed. Go short when a higher trough is formed. [Edit: one "higher trough" line is missing at the very start of this chart]

Average Pullback Histogram



Turn it around, if you want

When I first posted this on my blog, I received some feedback that indicators should always give buy signals when they are near the top of the chart, and sell signals when they are near the bottom.

This makes everything standard, and easy to understand when looking at a screen full of different charts.

In fact, this change has been incorporated into the Thinking Stuff software already. All you have to do is multiply the result by -1 to flip the indicator on its head.


Summary

While a little convoluted, this indicator will hopefully show when a trend has turned in a new direction. This either signals to get in on the new trend, or get out of trades you have in the opposite direction.

Don't forget the rules of use at the top! Enjoy.
 Print   

 
Donate
How much was this information worth to you? How much will you not lose in the market having read it? Donate a percentage of that to me, and everyone walks away happy.


Click here to donate
 Print   

 
Quotes
"Can't wait for your new version of TS! thanks man."
- J.T. (Malaysia)
  

 
Featured Articles
Download The Science of Getting Rich free!
  

 
Announcements
  

 
Blog
  

 
Popular Pages
  

 
Stats
Members Where Are They:
Visitor [4] : Home
Visitor [1] : Getting Started
Visitor [1] : Useful Free Stuff
Visitor [1] : Average Pullback Histogram
Visitor [4] : How And Where To Download Historical Price Data
Visitor [1] : The Path
Visitor [1] : Setting Up In Thinking Stuff
Visitor [7] : Knowledge Base
Visitor [10] : Blog
  

Membership Membership:
Latest New User Latest: rockpile
New Today New Today: 0
New Yesterday New Yesterday: 0
User Count Overall: 305

 Copyright 2005-2007