Home / Open questions / How to Backtest TradingView Advanced…
Open question NOT YET CONFIRMED

How to Backtest TradingView Advanced Indicators

Learn how to backtest advanced indicators on TradingView effectively.

Why this isn't answered outright

Traders keep asking this, but our backtests and cited sources don't (yet) settle it. Rather than invent a number or a verdict, here's what's actually known and what isn't.

Understanding Backtesting

Backtesting is a method used to evaluate the effectiveness of a trading strategy by applying it to historical data. It allows traders to see how a strategy would have performed in the past, which can help inform future trading decisions. In TradingView, users can backtest strategies using Pine Script, TradingView's programming language, to create custom indicators and strategies.

Using Existing Indicators

TradingView offers a wide range of built-in indicators that can be used for backtesting. To backtest these indicators, you can create a strategy script in Pine Script that incorporates the desired indicator. For example, you can use indicators like Moving Averages, RSI, or MACD within your strategy to define entry and exit points based on historical price data.

Steps to Backtest in TradingView

1. **Open TradingView**: Log into your TradingView account and select the asset you want to analyze.

2. **Access Pine Script Editor**: Click on the 'Pine Editor' tab at the bottom of the TradingView interface.

3. **Write Your Strategy**: Use Pine Script to write your strategy, incorporating the indicators you want to test. You can find examples and templates in the TradingView community or documentation.

4. **Add Buy/Sell Conditions**: Define the conditions under which your strategy will buy or sell based on the indicators' signals.

5. **Run the Backtest**: After writing your script, click on the 'Add to Chart' button to apply it. TradingView will display the backtest results, including performance metrics like net profit, drawdown, and win rate.

Analyzing Results

Once you have run the backtest, you can analyze the results to determine the effectiveness of your strategy. Look for key metrics such as the total return, maximum drawdown, and the number of trades. This analysis can help you refine your strategy further.

Not financial advice

This is general, educational information — not investment, trading, tax, or financial advice, and not a recommendation to buy or sell anything. Any figures come from our own hypothetical backtests (standard settings, realistic costs, with an out-of-sample check); past results do not guarantee future returns. Trading involves risk of loss. Verify everything yourself and consult a licensed professional before acting. See the methodology and full disclaimer.

Free · no spam

Get the weekly edge report

The best-performing indicator per asset, what changed this week, and the honest caveats — straight to your inbox.