OPEN-SOURCE SCRIPT
Actualizado Compound SMAs

This script calculates all the moving averages from a range of lengths (from X to Y), and plots the lowest (or highest) average for each. This gives an interesting effect where the MA line gives space to the price when rising (or falling) and tightens up when price is falling (or rising). This may be useful for getting into a position earlier and riding a trend longer. It may also be useful for decreasing whipsaw exits in trending markets.
It has a technical limitation, due to how many calculations the for loop has to do, i have included a limit input for the number of bars back to use in each MA. It is set to 3000 arbitrarily just to avoid sluggishness or potential crashes.
To use, identify the long term trend and choose "Bullish" or "Bearish". Input the source and range of MAs you would like included, and how many bars to use in the calculation. Optionally you may add a smoothing factor as well at the cost of additional lag.
It has a technical limitation, due to how many calculations the for loop has to do, i have included a limit input for the number of bars back to use in each MA. It is set to 3000 arbitrarily just to avoid sluggishness or potential crashes.
To use, identify the long term trend and choose "Bullish" or "Bearish". Input the source and range of MAs you would like included, and how many bars to use in the calculation. Optionally you may add a smoothing factor as well at the cost of additional lag.
Notas de prensa
Updated ChartScript 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.
Exención de responsabilidad
La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.
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.
Exención de responsabilidad
La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.