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, не являются финансовыми, инвестиционными, торговыми или любыми другими рекомендациями. Мы не предоставляем советы по покупке и продаже активов. Подробнее — в Условиях использования TradingView.

Хотите использовать этот скрипт на графике?