Average Pullback Histogram
Okay, so here are the rules of using my (hopefully new) indicator.
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. Geez, the guy over at Akumulate Pips (great site - go read it) released an indicator without even giving the details of how to calculate it, and he got all kinds of gratitude. I did this for me and not the gratitude, but a simple "thanks" would light me up for the rest of the day.
---
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).
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.
---
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.
---
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.
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]
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 of this post!
Enjoy.


6 Comments:
simple "thanks" :-) from the Iceman
I enjoyed your ideas. Thanks for sharing them. A couple suggestions:
Right now the indicator is dealing with hard values. Might be nice to convert the values into percentage change instead of the literal. So, a 5 point pullback on a $100 vehicle would be 0.05 or 5%.
Might even be interesting to apply an Average True Range to the mix in order to account for historical volitility. If 20 day Average True Range is 5 points and the current pullback is 7 points...then the corresponding value is 1.4. If Current pullback is 3...then value is 0.6.
I'm sure there are better ways to address the volatility issues. And if I get a chance to test some of this stuff out...I'll post back on the comments of your blog.
Keep up the good work!
Take care,
MT
Thank you VERY much for sharing!
Thanks guys. Michael, I will definitely experiment with your ideas and report back. But will finish the software first.
Sharky,
first I give you credits to this new indicator, will see what it can tell me in my trading.
One thing I learned when developing indicators to use on my charts. Keep it simple. And when I tried to get some understanding of the ADX, (which I myself redesigned into a new indicator as I couldn't read ADX in the heat of the day, watching 10 charts at the same time (http://globetrader.blogspot.com/2006/01/chart-description.html)) I saw, that when dealing with charts you should never ever violate one rule:
UP on any chart or indicator means Long, means Buy, means Uptrend, means prices ultimatly trend or will most likely go up. Vice versa for an indicator below zero. That has to mean Down.
And if my formula gives me reverse results, well then invert the result by multiplying it with -1. Doesn't change one thing, same scale, same patterns, just now Up means Up.
That's fair enough GlobeTrader. I admit that I thought about that point myself.
Post a Comment
<< Home