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 автор этого скрипта опубликовал его с открытым исходным кодом, чтобы трейдеры могли понять, как он работает, и проверить на практике. Вы можете воспользоваться им бесплатно, но повторное использование этого кода в публикации регулируется Правилами поведения. Вы можете добавить этот скрипт в избранное и использовать его на графике.

Хотите использовать этот скрипт на графике?

Отказ от ответственности