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 tell me about it so I can add the information to this page. 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 contact us.
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.
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 EUR/USD, then multiply both of those numbers by 10000, and if it's a currency with 2 decimal places like USD/JPY, 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).
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.
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]
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 TS already. All you have to do is multiply the result by -1 to flip the indicator on its head.
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.
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 tell me about it so I can add the information to this page. 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 contact us.
I came up with this indicator after reading about "Market Profile".
Essentially, when a new bar has closed, that close price fits into price area. For example, a USD/JPY price of 114.23 fits in the price area of 114.20 to 114.24.
114.23 also fits in the price area of 114.20 to 114.29, 114.00 to 114.49, 114.00 to 114.99, etc. It all depends on the number of pips you decided upon for each price area.
A number of other close prices also fit within that price range. You add up the total number of "hits" that each price range gets, and that number is what you chart.
I don't think there's anything new yet.
Here's an example of a Box of Shark:
114.00 to 114.04: 1
114.05 to 114.09: 0
114.10 to 114.14: 0
114.15 to 114.19: 2
114.20 to 114.24: 2
114.25 to 114.29: 4
114.30 to 114.34: 8
114.35 to 114.39: 2
114.40 to 114.44: 0
114.45 to 114.49: 1
In total, the above example plots 20 close prices. That's the period for this Box of Shark. And the box size is 5 pips.
When you chart this kind of thing, the chart has 2 dimensions.
When all the prices are grouped together in a small range (i.e. congestion), the number of price ranges used becomes small, and the average becomes big. In the example above there are 10 price ranges, with 20 close prices used, so the average is 2. But if the last 20 close prices fell between 114.10 and 114.19, then there would be just 2 price ranges, with the average becoming 10.
The number of price ranges, or the average, could therefore be used as some kind of warning - either the number of price ranges shrinks (and average grows) and therefore we are in congestion, or the number of price ranges grows (and average shrinks) and therefore the prices have become quite spread-out and volatile.
The other dimension is the total number of close prices that fall in a price range. In the example above, 8 is the maximum, and 2 is the average. This could be used as a replacement for support and resistance lines - any price range containing more than the average (or more than a multiple of the average) could be considered as an area of support or resistance.
You can use a rising average as signs of congestion, which might keep you out of a trade you might have otherwise entered.
Conversely, you might want a declining average, as a sign of increasing volatility, before you enter a trade.
In either case, I don't think those two signals could be used independently to make trading decisions - more likely they would be used as a further confirmation before entering a trade based on your other rules.
---
As I mentioned, the number of hits in each price range could be used as an alternative to support and resistance lines. In our example, the price range of 114.30 to 114.34 has 8 hits, so if the last close price fell in the price range of 114.25 to 114.29, and you were looking to go long, perhaps you wouldn't.
I was just looking at the rules I've already coded into TS to handle the Box of Shark. And I saw these two - "Box of Shark Histogram positive" and "Box of Shark Histogram negative". It was so long ago that I made this indicator up, and I had completely forgotten where the Histogram part came from.
Well, seems like I caught a MACD craze. The Box of Shark Histogram is calculated by taking a slow and fast average, of the average, and subtracting the slow from the fast.
Let's say the box size is 5 pips, and the period (number of close prices to chart) is 20, slow average has a period of 20, and the fast average has a period of 10.
Thus:
The Box of Shark Histogram is going to be positive when the Fast average is higher than the slow average.
What this means is the most recent averages are getting bigger. And averages getting bigger means the price is heading into congestion. All in all, not too much different to above, but perhaps a better signal than just using "one average is higher than another", because we are basing our judgement over many averages.
I also have rules such as "Last X B.O.S. Naturalised Average(s) Falling". A naturalised average just means rounding the average to a whole number. The average changing from 8 to 7, say, is a stronger signal than the average changing from 7.8 to 7.7.
Grouping the prices into boxes lets you step back a bit from the absolute detail of the price chart. This kind of thing is nothing new. It's used in Market Profile, and also P&F Charts, etc.
It's unknown whether the techniques above are going to be useful or not. Only backtesting will tell. At the least, they give objective ways to determine times of congestion and volatility, and of support and resistance levels.