Directional Movement Index Trend

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Esse DMI eu modifiquei para ver a tendência com maior clareza, e a linha do ADX ela muda de acordo com a força de tendência, a qual é perfeitamente configurável, a configuração eu deixei a minha configuração padrão, caso você queira modificar porque você vê a tendência em valores diferentes, sinta-se livre, e basicamente as colunas são a média de DI e indicam também com mais clareza a tendência.
///////////////////////
devido a um erro matemático que eu não tinha notado, a formula do DIA estava completamente errada, ela estava dividindo DI- por 2 ao invés da equação inteira, podendo levar uma análise ao erro, desculpa por isso
Special thanks to RedKTrader
- removed two variables that were used only once, and their values assigned directly in the plot() function
---------------------------------------------------------------------------------
Atualização de Código
- foi retirado duas variáveis que eram utilizadas apenas uma única vez, e seus valores atribuidos diretamente na função plot()
- Code update to version 5
- Added category separation for easier understanding when configuring settings
- Code refactored to be easier to understand
- The variables were renamed to match with the tradingview style guide recommendations.
- Minor changes to match with the tradingview style guide recommendations.
- ADX levels become float instead of integer
- Input and color variables is now typed
- It is now possible to paint the DI trend levels, special thanks to MonkeyNo1 for the idea
- special thanks to RedKTrader and MonkeyNo1 added in the third line of code
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Untuk akses pantas pada carta, tambah skrip ini kepada kegemaran anda — ketahui lebih lanjut di sini.
Penafian
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Untuk akses pantas pada carta, tambah skrip ini kepada kegemaran anda — ketahui lebih lanjut di sini.