All indicators

Mean Reversion V-F

Dec 27, 2024

Static chart image
SignalsMoving AveragesVolatilityRepainting Functionality

The Mean Reversion V-F tool is a multi-level layering strategy designed to capitalize on mean reversion opportunities in volatile assets like stocks and cryptocurrencies. It utilizes dynamic bands based on a moving average to execute scale-in long positions during significant price pullbacks.

Usage

The script is primarily used for identifying and executing long entries when price deviates significantly from its baseline. It employs a tiered entry system:

  • Layering Entries: The script places up to 5 tiered buy orders as the price drops further below the selected moving average. Each level is defined by a specific percentage deviation.
  • Position Sizing: As the price reaches deeper discount levels (lower bands), the script increases the position size to improve the average entry price. This can be configured as a fixed unit count or a cash-based value.
  • Exits: The strategy exits the entire position once a target take-profit percentage is reached relative to the average position price. Users can also enable a trailing take-profit feature to capture further upside during a reversal.

Details

The Mean Reversion V-F executes logic based on price interaction with dynamic bands derived from a central Moving Average (SMA, EMA, WMA, RMA, or HMA). When the price falls below the first deviation level and no trades are open, the first order is triggered. Subsequent orders are triggered only if the price continues to drop below lower deviations while the previous trades are active.

The strategy does not use a hard stop loss, relying instead on the mean reversion principle and tiered entries to navigate drawdowns until the price recovers to the target level.

Settings

General Settings

  • Use for Stocks: Toggles whether the position size inputs represent raw units (for stocks) or a cash value divided by price (for crypto).
  • Plot Dynamic level: Toggles the visibility of the deviation bands on the chart.
  • MA Type: Selects the calculation method for the central baseline (WMA, SMA, RMA, EMA, or HMA).
  • MA Length: Sets the lookback period for the central moving average.

Deviation Increments

  • Deviation Increment 1-5 (%): Defines the percentage distance from the moving average for each of the five entry levels.

Units Level

  • Level 1-5 (units in cash): Determines the size of each respective trade level. Increasing these values for lower levels creates a "martingale-style" weighting for the average price.

Take Profit

  • Target Take Profit (%): Sets the percentage gain required from the average entry price to close the position.
  • Enable Trailing: Activates a trailing mechanism for the take-profit target once the initial threshold is reached.
  • Trailing Distance %: Sets the percentage distance the trailing exit follows the price high.

FAQ

How do I access Mean Reversion V-F?

You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

Does this strategy work on all timeframes?

While it can be applied to any timeframe, it is most effective on timeframes where mean reversion tendencies are statistically significant and on assets with enough volatility to hit multiple deviation bands.

Why does the backtest look different when trailing is enabled?

The trailing take-profit feature uses intra-bar data. For the most realistic backtesting results when trailing is enabled, it is recommended to use the "Bar Magnifier" feature or "Deep Backtesting" on TradingView.

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.