OPEN-SOURCE SCRIPT

SMA Indicator (20, 50, 100)

SMA Script for 20,50 and 100 days

Key Features:
SMA Source:
Users can select the source for SMA calculation (e.g., close, open, high, low, hl2, etc.) via the input.source() function.
Default: close.
Dynamic Customization:
Color: Choose a color for each SMA line.
Visibility: Toggle SMA visibility.
Source: Change the source data used for SMA calculation.
Simplicity: Everything is configurable directly through the script settings.
How to Use:
Paste this script into the Pine Editor on TradingView.
Click Add to Chart.
Open the script settings (gear icon):
Set the desired lengths, colors, and visibility for SMA 20, 50, and 100.
Choose the source (e.g., close, open, high, etc.) for SMA calculations.
This version provides complete flexibility for SMA visualization and customization.
Simple Moving Average (SMA)simplemovingaverage100simplemovingaverage200simplemovingaverages

开源脚本

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

想在图表上使用此脚本?

免责声明