# Universal Signal Backtester

Universal Signal Backtester is an indicator on [Vela](https://vela.luxalgo.com/chart), our next-generation charting platform, written in Pine Script®.

The Universal Signal Backtester turns any signal into measurable results: predefined moving average crosses, crossovers of two external sources, or triggers piped in from your own scripts. It manages up to three take-profit and stop-loss levels, simulates spread and commission, and grades everything on a dashboard with Sharpe ratio, profit factor, and a time-based heatmap.

- Indicator in the LuxAlgo Library, by LuxAlgo, published Aug 6, 2026.
- Access: free.
- Concepts: [Profit Target Taxonomy](https://www.luxalgo.com/library/concept/profit-target-taxonomy/) (primary), [Moving Average Crossovers](https://www.luxalgo.com/library/concept/moving-average-crossovers/)
- Open on Vela: https://vela.luxalgo.com/chart?pineScriptCodeId=cha8zj8c2bknm7pv6y7arqq9
- Page: https://www.luxalgo.com/library/indicator/universal-signal-backtester/

The **Universal Signal Backtester** is LuxAlgo's on-chart framework for [signal validation](https://www.luxalgo.com/library/family/validation/): feed it almost any entry logic (a predefined moving average cross, a crossover of two external sources, or trigger events from another script) and it simulates the trades, draws every entry and exit, and grades the outcome. Its dashboard reports PnL, win rate, Sharpe ratio, profit factor, recovery factor, and max stagnation, plus a performance heatmap by day of week or by month.

## How to Trade the Universal Signal Backtester?

- **Predefined Crosses**: quick tests of standard setups such as the 9/21 EMA or Golden/Death Cross.
- **External Sources**: select two plotted series and backtest their crossovers.
- **External Signals**: connect triggers from your own indicators, with logic like "Not NA" or "Crosses Over 0" initiating trades.
- **TP/SL ladder**: enable up to three take-profits that scale out in equal parts and up to three stop-losses, where the first stop hit closes the remaining position; all are measured in ATR, ticks, or price points.
- **Heatmap read**: weak days or months expose time-based inefficiencies to filter out.

The tool simulates spread and commission through Forex, Crypto, and Stocks profiles or manual values, and an ATR choppiness filter ignores signals during low-volatility chop.

## Universal Signal Backtester Settings

- **Source Mode**: the entry logic (Predefined, External Sources, or External Signals).
- **Signal Logic**: how external signals are interpreted (e.g. Value Changes, Greater Than 0).
- **Distance Type / ATR Length**: the unit for targets and stops (ATR, Ticks, or Points) and the ATR lookback; **Trade Direction** filters long only, short only, or both.
- **TP/SL 1, 2, 3**: toggles each exit level and sets its multiplier.
- **Simulate Spread & Commission / Cost Profile**: applies realistic trading expenses (off by default).
- **Show Dashboard / Heatmap Period / Suggested TP Metric**: dashboard layout, day-or-month heatmapping, and the suggested-TP logic.

## Frequently Asked Questions

### Can it backtest signals from my own scripts?

Yes. Switch Source Mode to External Signals (Triggers), point the long and short inputs at your indicator's plotted output, and pick the signal logic that matches how your script fires. Entries, exits, and statistics are then managed automatically.

### How does it relate to the LuxAlgo Backtester (S&O)?

The [LuxAlgo Backtester (S&O)](https://www.luxalgo.com/library/indicator/luxalgo-backtester-s-o/) is purpose-built around the Signals & Overlays toolkit, while the Universal Signal Backtester is source-agnostic: it exists precisely so any signal on your chart can be tested with the same exit and cost framework.

### Is the Universal Signal Backtester free?

It is free in the LuxAlgo Library. Fittingly for a testing tool, it can also be loaded straight into Quant, our coding agent, from this page. You can also copy the source code from this page and run it anywhere Pine Script® runs.

## Related indicators

- [Market Structure Targets Model](https://www.luxalgo.com/library/indicator/market-structure-targets-model/) (Profit Target Taxonomy): markdown at https://www.luxalgo.com/library/indicator/market-structure-targets-model.md
- [Targets For Overlay Indicators](https://www.luxalgo.com/library/indicator/targets-for-overlay-indicators/) (Profit Target Taxonomy): markdown at https://www.luxalgo.com/library/indicator/targets-for-overlay-indicators.md
- [Targets For Many Indicators](https://www.luxalgo.com/library/indicator/targets-for-many-indicators/) (Profit Target Taxonomy): markdown at https://www.luxalgo.com/library/indicator/targets-for-many-indicators.md
- [Opening Range with Breakouts & Targets](https://www.luxalgo.com/library/indicator/opening-range-with-breakouts-targets/) (Profit Target Taxonomy): markdown at https://www.luxalgo.com/library/indicator/opening-range-with-breakouts-targets.md
- [CBC Flip with Targets and Filters](https://www.luxalgo.com/library/indicator/cbc-flip-with-targets-and-filters/) (Profit Target Taxonomy): markdown at https://www.luxalgo.com/library/indicator/cbc-flip-with-targets-and-filters.md
- [Signal Moving Average](https://www.luxalgo.com/library/indicator/signal-moving-average/) (Moving Average Crossovers): markdown at https://www.luxalgo.com/library/indicator/signal-moving-average.md
- [Signal Forge](https://www.luxalgo.com/library/indicator/signal-forge/) (Moving Average Crossovers): markdown at https://www.luxalgo.com/library/indicator/signal-forge.md
- [Stop-and-reverse](https://www.luxalgo.com/library/indicator/stop-and-reverse/) (Risk & Exits): markdown at https://www.luxalgo.com/library/indicator/stop-and-reverse.md

---

Source: https://www.luxalgo.com/library/indicator/universal-signal-backtester/ (LuxAlgo Library). Free to use with attribution: https://www.luxalgo.com/library/license/
