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!
진정한 TradingView 정신에 따라, 이 스크립트의 저자는 트레이더들이 이해하고 검증할 수 있도록 오픈 소스로 공개했습니다. 저자에게 박수를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰에 의해 관리됩니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.