today I was browsing through intraday Charts looking at some moving averages. Basically what I wanted to see was whether the currency pair was trading below or above the moving average of the day/week/month. For a better understanding: The daily MA on a 15 minute Forex Chart would be the 96 MA.
I encountered the problem that i always had to change the settings for my MAs when changing the Time Interval, so I coded this here up. It is pretty simple but maybe somebody else has the same problem and can put it to use.
The script has some settings as listed below:
Choice which MAs to plot, (Daily, Weekly, Monthly)
Choice which type of MA to use (Simple, Exponential, Weighted)
Neccesary Settings for the correct calculation (e.g. Number of trading hours per day). These settings depend on the instrument you are using and should always be checked before using this script.
There are a few things to Note when using this script:
This script works for intraday charts only.
The monthly MA doesn't work on any Time Interval smaller than 15 minutes. Can't do anything about it unfortunately.
This is my first published Script, use it with caution and let me know what you think about it!
Dengan semangat TradingView yang sesungguhnya, penulis skrip ini telah menerbitkannya sebagai sumber terbuka, sehingga para trader dapat memahami dan memverifikasinya. Hormat untuk penulisnya! Anda dapat menggunakannya secara gratis, namun penggunaan kembali kode ini dalam publikasi diatur oleh Tata Tertib. Anda dapat memfavoritkannya untuk digunakan pada chart
Informasi dan publikasi tidak dimaksudkan untuk menjadi, dan bukan merupakan saran keuangan, investasi, perdagangan, atau rekomendasi lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Persyaratan Penggunaan.