Broker/Data: Advantage Futures, Ninja/TT and InvestorRT/IQFeed.
Favorite Futures: Treasury futures
Posts: 275 since Nov 2010
Thanks: 165 given,
Wow, ask and you shall receive! Thanks, Harry. I thought it would be easy to code but for me that probably would have been a frustrating 8 hour torture session.
Everyone talks about avoiding chop, and chop is nothing but a lot of bar overlap. It's easy to see but I always thought it might be helpful to quantify the overlap. Thanks for the help and the quick response. Hope everything is going well for you, I just walked the dog and it is 9 degrees F (-13 C). I want to be somewhere WARM!
"You don't need a weatherman to know which way the wind blows..."
I am still not satisfied with the first approach. I think that there is a conceptual problem.
If you have a wide ranging bar - which in fact ends the chop period - it is likely to overlap with more of the preceding bars than the prior narrow range bars. The breakout bar would therefore obtain the highest chop reading, and only the bar after the breakout bar would show little overlap. This means that the original indicator is lagging unnecessarily by 1 bar.
I have therefore tried to modify the concept in several ways.
(1) I am looking at which fraction of the last bar is covered by previous bars. The results are weighted in a way that the prior bar has a higher weight than the prior2 bar, the prior2 bar a higher weight than the prior 3 bar.
(2) Then I have added a simple SMA as a signal line.
It is still an experimental indicator. The chart below shows that
-> when the bars are exceeding the signal line, it is getting choppy
-> when the bars stay below the signal line, price is trending
I think it is possible to transform this into a MACD type indicator, which indicates chop and trending conditions via an EMA or a SMA cross.
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).
The following 5 users say Thank You to Fat Tails for this post: