--- ENGLISH ---
A Useful Tool For Any Trader:
This is just an EMA but with a catch: it will color the EMA line base on wether it's increasing or declining therefore making it easy to see when we are on a downtrend or an uptrend.
In a downtrend the line will turn red and in an uptrend, it will turn white.
Both the color and the EMA length can be customized as desired.
Free Code:
Feel free to use this code in any way you like. No permission is need.

--- PORTUGUÊS ---
Uma Ferramenta Útil Para Qualquer Trader:
Esta é uma simples média móvel exponencial porém com um diferencial: ela irá colorir a linha da média com base em seu delta. Se a linha estiver variando positivamente ela será colorida de branco, mas se estiver variando negativamente será colorida de vermelho.
Esta coloração torna fácil de visualizar se estamos em uma tendência de alta ou baixa.
Em uma tendência de baixa, o preço será constantemente menor que a média e portanto ela estará caindo e será colorida em vermelho.
Já em uma tendência de alta, o preço será constantemente maior que a média e portanto ela estará subindo e será colorida em branco.
Tanto as cores como o período da média são customizáveis.
Código Livre:
Fique à vontade para utilizar este código como desejar. Não há necessidade de solicitar permissão.

Mateus Rapini
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?