All indicators

Support and Resistance Backtester [SS]

Jul 26, 2023

Static chart image
Support and ResistanceDashboard

The Support and Resistance Backtester [SS] tool provides users with a quantitative framework to evaluate the historical reliability and efficacy of specific price levels. By allowing traders to input their own identified support and resistance areas, the script calculates hit rates, success percentages, and frequency of touches to determine which levels hold the most weight objectively.

Usage

To use the indicator, follow these primary steps:

  1. Define Levels: Input up to five specific price levels you wish to test. Setting a level to 0 will exclude it from the backtest and the chart display.
  2. Set Threshold: Adjust the "Threshold parameter" to define a zone around your level (e.g., $1.00). This represents the "wiggle room" or stop-out distance you allow before a level is considered failed.
  3. Choose Source: Select the price source (Close, High, or Low) to determine how price interaction is assessed. Using "Close" is generally recommended for assessing definitive breakouts vs. bounces.
  4. Lookback Period: Set the number of candles to analyze. Recommended values are 300 candles for timeframes under 1 hour and 500 candles for daily charts.
  5. Visualize Results: Toggle "Plot Threshold Limits" to see the active zones on your chart. You can also enable "Plot Passes" or "Plot Fails" to see exactly where the level held or broke historically.

Details

The indicator quantifies support and resistance by analyzing price behavior within the user-defined threshold zone. A "Support Pass" occurs when price enters the zone from above and subsequently bounces higher, while a "Support Fail" occurs when price pierces through the zone and closes below the lower threshold.

The dashboard output provides:

  • Success Rate as Support vs. Resistance: Identifies if a level is more reliable when approached from above or below.
  • Total Number of Touches: Measures how much time (in candles) price spends consolidating or interacting with a specific level, helping to identify "high-interest" price areas.
  • Aggregated Success Percentage: Provides a final score on the overall reliability of the level across the entire lookback period.

Settings

General Settings

  • Plot Support and Resistance Levels: Toggles the visibility of the primary horizontal lines.
  • Plot Labels: Shows price labels next to the levels on the right axis.
  • Plot Threshold Limits: Displays the "zone" created by the threshold parameter.
  • Display Chart: Toggles the statistical dashboard visibility.

Support and Resistance Levels

  • Support/Resistance 1-5: Manual input fields for the price levels you want to backtest.

Backtest Parameters

  • Source: The price point used for calculations (Close, High, Low, etc.).
  • Lookback: The number of historical bars included in the calculation.
  • Threshold parameter: The distance (+/-) from the level that defines the valid support/resistance zone.
  • Plot Passes/Fails: Overlays labels on the chart at every historical point where a level was tested.

FAQ

How do I interpret the Success Rate? A high success rate as support (e.g., 80%) indicates the level has historically provided a strong floor. Conversely, if a level has a low success rate as resistance, price frequently breaks through it when approaching from below.

Can I test more than 5 levels at once? The current version supports up to 5 concurrent levels to maintain chart clarity and performance.

How do I access Support and Resistance Backtester [SS]? 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.