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

Script open-source

Dans le plus pur esprit TradingView, l'auteur de ce script l'a publié en open-source, afin que les traders puissent le comprendre et le vérifier. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais la réutilisation de ce code dans une publication est régie par nos Règles. Vous pouvez le mettre en favori pour l'utiliser sur un graphique.

Vous voulez utiliser ce script sur un graphique ?


Aussi sur:

Clause de non-responsabilité