OPEN-SOURCE SCRIPT
llama fixed-length moving averages [SMA, WMA]

Llama Moving Averages
I needed moving averages on my charts, but I wanted them hardcoded based on the following values:
timframe --- MA length
Daily --- 20D (==1 trading month)
Weekly --- 30W (30W moving averages for assessing long term trends)
15m --- 1W (or 5 days)
Two averages:
EMA and WMA: fast moving and slow moving based on closes.
In addition to this, I needed the following things:
1. MAs ONLY on 15m, 1D and 1W timeframes.
2. Consistent colors.
3. for 15m chart, we want a 5D SMA, so 1D = 15m * 25(±1); times 5; 25*5 = 125
4. Option to configure different values for the daily chart, since I trade the daily chart. Defaults: 20.
If you were looking for something similar, enjoy!
I needed moving averages on my charts, but I wanted them hardcoded based on the following values:
timframe --- MA length
Daily --- 20D (==1 trading month)
Weekly --- 30W (30W moving averages for assessing long term trends)
15m --- 1W (or 5 days)
Two averages:
EMA and WMA: fast moving and slow moving based on closes.
In addition to this, I needed the following things:
1. MAs ONLY on 15m, 1D and 1W timeframes.
2. Consistent colors.
3. for 15m chart, we want a 5D SMA, so 1D = 15m * 25(±1); times 5; 25*5 = 125
4. Option to configure different values for the daily chart, since I trade the daily chart. Defaults: 20.
If you were looking for something similar, enjoy!
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。