Fear and Greed Index

Red = greed
Green = fear
I updated a lot of the subcomponents and fixed a bug. I've reduced the smoothing to 1, it was previously 5 if you prefer smoother signals. Also added a McClellan oscillator.
I've commented out the plotting of individual sub-components, just uncomment them to see what they do. Some look like pretty useful indicators on their own.
Enjoy!
Regarding the divergence lines, the fear and greed index which this is based on is, apparently, supposed to be a market timing indicator, although it may well be better off being used as a momentum indicator. Because of this I am not certain that the upper divergence lines should be red to indicate bearish divergences and green for bullish ones. Let me know if you have any thoughts about that.
Script de código abierto
Siguiendo fielmente el espíritu de TradingView, el creador de este script lo ha publicado en código abierto, permitiendo que otros traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la publicación de este código está sujeta a nuestras Normas internas.
Para acceder rápidamente a un gráfico, añada este script a sus favoritos: obtenga más información aquí.
Exención de responsabilidad
Script de código abierto
Siguiendo fielmente el espíritu de TradingView, el creador de este script lo ha publicado en código abierto, permitiendo que otros traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la publicación de este código está sujeta a nuestras Normas internas.
Para acceder rápidamente a un gráfico, añada este script a sus favoritos: obtenga más información aquí.