Does anyone know how to create a scan for divergences for price and indicators such as MACD, Stochastics, etc.?
need help I am looking for Divergence watchlist column,
I found this link but don't see watchlist column.
https://usethinkscript.com/threads/macd-divergence-indicator-for-thinkorswim.35/
please help
Thank you
You might have noticed that there are quite a few scripts floating around the internet and this forum that aim to identify various divergences. While their attempts are valiant, the success rates are dismal.
Lots of scripts. But no one has found good open-source code for identifying divergences.
Manual chart analysis is the only tried and true method for identifying divergence. It might take a bit more effort, but it's worth it for the accuracy.
But as you might want to find this out for yourself:
Here is a jack-of-all trades and all divergences that you can start with:
https://usethinkscript.com/threads/rsi-obv-macd-stoch-cci-or-mfi-divergence-for-thinkorswim.13106/
After that, here are all the other divergence scripts on this forum, sorted by popularity.
Yes, you will need to read through these long threads to understand the short-comings and the various workarounds that have been attempted.
https://usethinkscript.com/search/1223963/?q=divergence*&t=post&c[child_nodes]=1&c[nodes][0]=3&c[title_only]=1&o=replies&g=1
As far as watchlists. They are even more problematic. There are no watchlists for divergences that I could find. As most need to use future bars, in order to go into the future to identify the divergence and then go back in time to mark it. Meaning the divergence was not identified in real time, but watchlists are real time so hard to get future stuff to show up.
However, again this is probably something you need to test out for yourself.
So feel free to stuff any divergence script that interests you into your watchlist column.
If you run into any issues stuffing a script into a watchlist, yell.
common stuffing issues:
1. You need to limit it to just the one plot that you want in your column. Comment out all other plots.
2. If you get a "Too Complex" error that means the script cannot be used in watchlists, scans, conditional orders, or any other widget that interfaces with the condition wizard. Most will be too complex.
Good luck. Come back with an update, if you have any breakthroughs.