OPEN-SOURCE SCRIPT
已更新 kou_di

The Simple Moving Average (SMA) is the most basic and widely used type of moving average. It’s calculated by taking the arithmetic mean of a given set of prices or data points over a specified period.
SMA = (P1 + P2 + ... + Pn) /n
Where
P1, P2, ... , Pn = prices of data points
n = number of periods
When a new SMA is calculated for a new candle stick, the oldest data point P1 is removed from the original data points (P1 + P2 + ... + Pn) and a new price Pn+1 is added to form a new SMA:
SMA_new = (P2 + ... + Pn + Pn+1) /n
If Pn+1 < P1, SMA line will become downward trend, or if Pn+1 > P1, SMA line will become upward trend. This logic help us predict the moving direction of SMA line which will form the prices trend in the future.
So it's important to highlight the "P1" candle stick for SMAs of different periods to help us predict the trend of SMA lines.
Since SMA5, SMA10, SMA20, SMA60, SMA120, SMA250 are the most popular SMAs, this indicator marks the "P1" candle stick for all of them by default, but you can optionally disable them.
该指标用于显示SMA5, SMA10, SMA20, SMA60, SMA120, SMA250 的扣抵位来监测均线拐点的出现
SMA = (P1 + P2 + ... + Pn) /n
Where
P1, P2, ... , Pn = prices of data points
n = number of periods
When a new SMA is calculated for a new candle stick, the oldest data point P1 is removed from the original data points (P1 + P2 + ... + Pn) and a new price Pn+1 is added to form a new SMA:
SMA_new = (P2 + ... + Pn + Pn+1) /n
If Pn+1 < P1, SMA line will become downward trend, or if Pn+1 > P1, SMA line will become upward trend. This logic help us predict the moving direction of SMA line which will form the prices trend in the future.
So it's important to highlight the "P1" candle stick for SMAs of different periods to help us predict the trend of SMA lines.
Since SMA5, SMA10, SMA20, SMA60, SMA120, SMA250 are the most popular SMAs, this indicator marks the "P1" candle stick for all of them by default, but you can optionally disable them.
该指标用于显示SMA5, SMA10, SMA20, SMA60, SMA120, SMA250 的扣抵位来监测均线拐点的出现
發行說明
Fix a bug發行說明
Update the display of labels發行說明
Addressed comment - Allow changing the color of label and label text開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。