All indicators

Logistic RSI, STOCH, ROC, AO, ... by DGT

Nov 4, 2020

Static chart image
SignalsOscillatorsVolatility

The Logistic RSI, STOCH, ROC, AO, ... by DGT indicator applies the Logistic Map Equation to widely used oscillators to highlight nonlinear momentum dynamics and chaotic price behavior. By iterating the equation multiple times, the tool generates a unique visualization of trend strength and volatility for technical analysis.

Usage

The Usage section describes how the script can be used to interpret market momentum through the lens of chaos theory. The indicator takes a base oscillator and transforms it using the Logistic Map formula $X_{n+1} = r \cdot X_n \cdot (1 - X_n)$.

  • Oscillator Selection: Users can choose from five base inputs: Awesome Oscillator (AO), Rate of Change (ROC), Relative Strength Index (RSI), Stochastic (STOCH), or a custom "Logistic Dominance" metric.
  • Iteration Visualization: The script calculates 30 iterations of the equation. These are plotted as discrete markers (Cross), continuous lines, or step lines. Values above zero are colored bullishly, while values below zero are colored bearishly to signify power shifts.
  • Volatility Analysis: The standard deviation of the iteration array can be plotted as a single line. This provides a summarized view of the chaotic dispersion, acting as a proxy for trend volatility.
  • Backtest Framework: The script includes a built-in simulation engine. Users can enable "Enable Backtest" to visualize entries (L), exits (S), and stop-loss (SL) triggers based on the indicator's state changes.

Details

The Logistic Map is a polynomial mapping of degree 2, often cited as an archetypal example of how complex, chaotic behavior can arise from very simple nonlinear dynamical equations. In this implementation:

  • Variable r: The base oscillator value is normalized and assigned to the variable $r$ (typically $0 < r < 1$).
  • Iteration Process: The script uses Pine Script arrays to store and iterate the results. Each result $X_n$ is fed back into the equation to produce $X_{n+1}$, amplifying subtle shifts in the original oscillator's momentum.
  • Standard Deviation: By calculating the standard deviation of the 30 generated iterations, the script identifies periods of high "chaos" or divergence in momentum, which often precede trend reversals or breakouts.

Settings

  • Select Indicator: Determines the base oscillator used as the input for the Logistic Map transformation.
  • Source: The price source (e.g., Close) used for the calculations.
  • Logistic Map Length: The lookback period used to normalize the input signal. Higher values result in smoother, more stable iterations.
  • Optimization / Customization Metrics: Individual length settings for AO, ROC, RSI, STOCH, and Logistic Dominance to fine-tune the base oscillator.
  • Style: Changes the visual representation of the iterations (Cross, Line, or StepLine).
  • Standard Deviation Line Alone: When enabled, hides individual iterations and only displays the summarized volatility signal.
  • Enable Backtest: Activates the simulation framework to track hypothetical performance.
  • Trade Mode: Filters the backtest to simulate Long Only, Short Only, or Both directions.
  • Apply Stop Loss: Enables an intrabar exit based on a user-defined percentage move against the entry price.
  • Show Trade Statistics: Toggles a floating information box containing win rate, PnL, and trade counts.

FAQ

How do I interpret the chaotic iterations versus the standard deviation line? The individual iterations show the "spread" of momentum; when they converge, the trend is stable, and when they diverge, volatility is increasing. The standard deviation line summarizes this spread into a single readable trend line.

Can I use this for automated alerts? Yes, the script is optimized for alerts. You can set alerts for the confirmation signals used in the backtest framework or for specific iteration crossovers.

How do I get access to the Logistic RSI, STOCH, ROC, AO, ... by DGT? You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

Free indicator

Get free access to this indicator on the platforms below.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.