All indicators

Universal Signal Backtester

By LuxAlgoAug 6, 2026

Static chart image
SignalsDashboardMoney Management

The Universal Signal Backtester indicator empowers traders to rigorously test, visualize, and analyze trading signals from any source directly on their charts with a comprehensive, performance-focused dashboard.

Usage

The Universal Signal Backtester is designed to be a flexible framework for validating trading strategies. You can use it to test built-in moving average crossovers or pipe in your own custom signals from other indicators.

Selecting Your Signal Source

You can toggle between three primary modes in the settings:

  • Predefined Crosses: Ideal for beginners or quick testing using standard setups like 9/21 EMA or Golden/Death Crosses.
  • External Sources (Crossovers): Allows you to select two external inputs to detect crossovers.
  • External Signals (Triggers): Connects to custom signals from your other indicators, interpreting logic like "Not NA" or "Crosses Over 0" to initiate trades.

Configuring Trade Exits

The tool supports multiple take-profit (TP) and stop-loss (SL) levels. You can enable up to three of each, allowing for partial exit strategies. The script automatically manages trade states, calculating PnL, win rates, and recovery factors based on your chosen distance type, whether that is fixed ATR, ticks, or specific price points.

Analyzing Performance

The integrated dashboard provides instant feedback on your strategy. It calculates critical metrics like the Sharpe Ratio, Profit Factor, and Max Stagnation. You can also view a performance heatmap that breaks down results by either days of the week or months, helping you identify time-based inefficiencies in your trading approach.

Details

The script functions as an advanced trade manager and backtesting engine. It maintains internal arrays to track equity curves and historical PnL, simulating real-world trading conditions through configurable cost settings.

When a signal is detected, the script draws visual markers, entry lines, and exit targets. It processes trade exits based on the sequence of hitting targets or stop losses, and even accounts for "orphaned" lines if a trade is exited manually or via an opposite signal reversal. The performance metrics are updated in real-time, providing a high-level view of strategy robustness.

Settings

Source Settings

  • Source Mode: Determines the logic used to trigger entries (Predefined, External Sources, or External Signals).
  • Predefined Cross: Selects from popular moving average combinations.
  • External Fast/Slow Source: User-defined sources for crossover logic.
  • External Long/Short Signal: Inputs for custom signals.
  • Signal Logic: Defines how the script interprets external signals (e.g., Value Changes, Greater Than 0).
  • Trade Direction: Filters trades to Long only, Short only, or both.

Filters

  • Use ATR Choppiness Filter: Ignores signals during low-volatility periods to reduce "noise" in your backtest.
  • ATR Smoothing Length: Adjusts the sensitivity of the ATR filter.

Target Settings

  • Distance Type: Sets the unit of measurement for TP and SL (ATR, Ticks, or Points/Fiat).
  • ATR Length: The lookback period for ATR-based calculations.

Take Profit & Stop Loss

  • TP/SL 1, 2, 3: Enables individual exit levels and allows you to set their multiplier values relative to your chosen distance type.

Dashboard

  • Show Dashboard: Toggles the analytical table on or off.
  • Dashboard Position/Size: Customizes the layout and scale of the dashboard.
  • Heatmap Period: Switches between Days of Week and Months for performance heatmapping.
  • Suggested TP Metric: Configures the logic for the best TP suggestion, such as maximizing hit rate or risk-reward ratio.

Visuals & Costs

  • Gradient Candle Coloring: Colors candles based on the distance between the fast and slow sources.
  • Use Costs: Enables simulation of real-world trading expenses like spread and commission.
  • Cost Profile: Selects predefined profiles (Forex, Crypto, Stocks) or custom manual values.

FAQ

How do I access the Universal Signal Backtester? You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

Can I test signals from my own custom scripts? Yes, by selecting "External Signals (Triggers)" in the Source Mode, you can plot your indicator's data and use this tool to backtest it against your specific entry logic.

What does the Heatmap tell me? The heatmap highlights profitable and unprofitable periods, enabling you to optimize your strategy by identifying specific days or months where your signal performs best.

Free indicator

Get free access to this indicator on the platforms below.

TradingView
NinjaTrader
MetaTrader 4/5

The Library is free. Quant makes it yours.

Pull any concept or indicator into Quant: rebuild it, retune it, or turn it into a backtested strategy of your own.