OPEN-SOURCE SCRIPT

Normalized Linear Regression (LSMA) Oscillator

Normalized Linear Regression (LSMA) Oscillator
By Nathan Farmer

The Normalized LSMA Oscillator is a trend-following indicator that enhances the classic Linear Regression (LSMA) by applying a range of normalization techniques. This indicator allows traders to smooth out and normalize LSMA signals for better trend detection and dynamic market adaptation.

Key Features:

Configurable Normalization Methods:
This indicator offers several normalization techniques, such as Z-Score, Min-Max, Mean Normalization, Robust Scaler, Logistic Function, and Quantile Transformation. Each method helps in refining LSMA outputs to improve clarity in both trending and ranging market conditions.

Smoothing Options:
Smoothing can be applied after normalization, helping to reduce noise in the signals, thus making trend-following strategies that use this indicator more effective.

Recommended Settings:
  1. Logistic Function Normalization: Recommended length of around 12, based on my preferred signal frequency.
  2. Z-Score Normalization: Medium period (close to the default of 50), based on my preferred signal frequency.
  3. Min-Max Normalization: Medium period, based on my preferred signal frequency.
  4. Mean Normalization: Medium period, based on my preferred signal frequency.
  5. Robust Scaler: Medium period, based on my preferred signal frequency.
  6. Quantile Transformation: Medium period, based on my preferred signal frequency.


Usage:
Designed primarily for trend-following strategies, this indicator adapts well to varying market conditions. Traders can experiment with the various normalization and smoothing settings to match the indicator to their specific needs and market preferences.

Recommendation before usage:
Always backtest the indicator for yourself with respect to how you intend to use it. Modify the parameters to suit your needs, over your preferred time frame, on your preferred asset. My preferences are for the assets I happened to be looking at when I made this indicator. Odds are, you're looking at something else, over a different time frame, in a different market environment than what my settings are tailored for.
Linear RegressionlinearregressioncurveLeast Squares Moving Average (LSMA)normalizationnormalizedlsmaOscillatorssmoothingTrend Analysistrendfollowingtrendtrading

開源腳本

在真正的TradingView精神中,這個腳本的作者以開源的方式發佈,這樣交易員可以理解和驗證它。請向作者致敬!您可以免費使用它,但在出版物中再次使用這段程式碼將受到網站規則的約束。 您可以收藏它以在圖表上使用。

想在圖表上使用此腳本?


更多:

免責聲明