peacefulLizard50262

Slope Normalized (SN)

Introduction:

The Normalized Slope script is a technical indicator that aims to measure the strength and direction of a trend in a financial market. It does this by calculating the slope of the source data series, which can be any type of data (such as price, volume, or an oscillator) over a specified length of time. The slope is then normalized, meaning it is transformed to a scale between -1 and 1, with 0 representing a flat trend.

Methodology:

The Normalized Slope script uses an exponential smoothing function to smooth the source data series. The smoothing factor, or alpha, can be adjusted by the user through the input parameter "Pre Smoothing".

Next, the script calculates the slope of the smoothed data series by finding the average difference between the current value and the values of the previous "Length" periods. This slope is then normalized using a function that scales the data to a range of -1 to 1, with 0 representing a flat trend. The normalization function takes the minimum and maximum values of the slope, calculates the difference between them, and then scales the data to the range of -1 to 1.

The normalized slope is then smoothed again using another exponential smoothing function with a user-adjustable smoothing factor (the "Post Smoothing" input parameter). A center line representing a flat trend can also be plotted on the chart by enabling the "Center Line" input parameter. Additionally, the user can choose to display bounds at the -1 and 1 levels by enabling the "Bounds" input parameter.

Conclusion:

The Normalized Slope script provides traders with a visual representation of the strength and direction of a trend in a financial market. It can be used as a standalone indicator or in combination with other technical analysis tools to help traders make informed trading decisions.
發布通知:
Added outlier detection lmfao.
發布通知:
added hard clipping
發布通知:
I added a switch to disable hard clipping.
發布通知:
you can now fine tune the outlier level
發布通知:
Major Update
發布通知:
minor bug fix
發布通知:
Major Update
發布通知:
minor bug fix again?
發布通知:
updated bounds minimum

開源腳本

本著真正的TradingView精神,該腳本的作者將其開源發布,以便交易者可以理解和驗證它。為作者喝彩吧!您可以免費使用它,但在出版物中重複使用此代碼受網站規則的約束。 您可以收藏它以在圖表上使用。

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。

想在圖表上使用此腳本?