Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Perhaps another way to scan for divergences is to have a correlation indicator that shows the correlation for a certain lookback period between the Demand Index and closing price. If the correlation falls below 0.4, we have a divergence and if it falls below 0, we have a negative divergence. I could find a correlation indicator in NT that shows correlation between 2 instruments but not between an indicator and price. If someone could code such a correlation indicator, if could flag out divergences between price and any momentum indicators (e.g. Demand Index, RSI, MACD Histogram, CCI, etc).
Managed to code the indie to show the correlation between Demand Index and price in the Thinkorswim platform. When the indie drops below 0.4, we have divergences between the Demand Index and price. A possible trading strategy would be trade in the direction of prevailing trend whenever the indie crosses back above 0.4. The Thinkscript code are given below:
#hint:<b>Demand Index</b>\nDeveloped by James Sibbet, the Demand Index is a market strength study that calculates a ratio of buying to selling pressure. It incorporates price and volume to indicate a change in price trend.
#hint length: The number of bars used to calculate the Demand Index. <b>(Default is 5)</b>
Platform: NinjaTrader (It's a love/hate relationship)
Trading: CL, TF, 6E
Posts: 169 since May 2010
Thanks Given: 60
Thanks Received: 314
Better Momentum for NT7 from Emini-Watch has a divergence indicator built in. If you purchase it, you also get a version that allows you to apply the divergence function to any other indicator of your choosing. For example, you can apply the divergence dots to RSI or Stochastic if that suits you. Pretty reasonable at $170.
Thanks for posting the code. But at first sight I have some difficulty to imagine a trading strategy using this indicator, but then I have no experience with the Demand Index.
Divergences have me gotten in trouble quite often, so I believe that you need additional filters.
I you don't make sure you are very intimate with divergence produced by your particular indicator, you will loose your shirt... and probably your pants!
Thanks monpere. I have just backtested the divergence indicator with another trend following indicator for entry, and exit using an ATR trailing stop indicator. The backtesting results looks good but walk forward analysis results is not good. This confirms that I will loose my shirt trading divergence in real time. Nonetheless, I think divergence may serve as a tool to alert me to have a second look at price actions.
I looked at these sites and did a Google search on James Sibbet and Demand Index. The best I could do was find some code developed by eSignal and some in Trader's Laboratory.
I was unable to find any in Ninja. More interesting, I could not find any of James' original work. I did, however, find this same quote in several places:
The Demand Index, developed by James Sibbet, combines price and volume in such a way that it is often a leading indicator of price change. The Demand Index calculations are too complex, however, for this text. The calculations require 21-column accounting paper to calculate manually.
There are six "rules" to the Demand Index:
A divergence between the Demand Index and the price trend suggests an approaching weakness in price.
One more rally to new highs usually follows an extreme peak in the Demand Index (the Index is performing as a leading indicator).
Higher prices with a lower Demand Index peak usually coincides with an important top (the Index is performing as a coincidental indicator).
The Demand Index penetrates the level of zero indicating a change in trend (the Index is performing as a lagging indicator).
When the Demand Index stays near the level of zero for any period of time, a weak price movement that will not last long is indicated.
A large long-term divergence between prices and the Demand Index indicates a major top or bottom.
The reason I think everyone is quoting each other is they use the same line:
The Demand Index calculations are too complex, however, for this text. The calculations require 21-column accounting paper to calculate manually.
I'm not sure, but can you even buy 21-column accounting paper anymore?
So although I have this code in Language 'X', I am not sure when I get done moving it to Ninja if I have the right logic. Code isn't worth much if the logic is wrong from the get go.
Anybody have any thoughts on where to find James Sibbet's original logic?