StaticNoiseLog

SNL Popular Moving Averages MTF

StaticNoiseLog 已更新   
SNL△ Popular Moving Averages MTF
Short title: PopMAs

These are popular moving averages used by various traders and they are multi-timeframe, i.e. you can see
the 200 day SMA on a 15 minute chart.
Four moving averages are also included for the current timeframe (20, 50, 100 and 200 EMA).
Not all moving averages are enabled by default. You can turn individual moving averges on or off in the
"Style" tab of the indicator's settings.

The way I see moving averages is that they do not represent a magic mathematical truth, but are simply the
result of many people agreeing on the same parameters. I guess the origin were five working days in a week
and therefore a month would be four times five, i.e. a 20 day SMA. 200 days are probably an estimate of
the work days in a year and the 50 day SMA represents a quarter year.

There are many indicators on TradingView that offer various adjustable moving averages, including
combinations and multi-timeframe. But my interest was to have an indicator with the most popular moving
averages and it should be multi-timeframe capable. By design I did not want to make the periods adjustable,
but you could add this easily if you like.

Here are some examples of poplular moving averages:

20 unit EMA : support on 4h BTC chart, Carl the Moon
20, 50, 100, 200 day SMA : classic trading all charts, Benjamin Cowen, Tone Vays
20, 50, 100, 200 week SMA: Benjamin Cowen
21 week EMA: well known BTC support, Benjamin Cowen
800 hour EMA: Traders Reality -> not possible in TradingView, represented as 33 day EMA

Known problems:
- I have not found a way to turn off floating labels according to a plot's state chosen in the "Style"
tab. So you will still see the label floating around even if you have turned off the moving average's
line. But you can always turn of all the floating labels in the settings.
- I have observed unexpected differences on multi-timeframe values: For example, looking at the true 20
week SMA on a weekly BTC chart showed a present time value of 43821 USD, but the value was 43908 USD
for the result of this call used in this script: security(syminfo.tickerid, "W", sma(close, 20))
The difference went away when switching my chart to weekly and back to 15 minutes.

Please comment if you know of other moving averages that are often and successfully used or if you find
that one of the included moving averages is irrelevant and should be removed from this script.
And I would very much appreciate any input regarding the mentioned known problems.
版本注释:
removed unused variable, no functional change
开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?