Why every trader needs backtesting
Hello, traders! If you’ve ever asked yourself:
“Does this strategy actually work, or am I about to donate my money to the market?”
Then you need to know how to backtest on TradingView.
Backtesting is like a time machine for traders – it lets you take your strategy and test it against historical price data to see if it would have made you money… or just heartbreak.
In today’s guide, we’ll cover:
- What backtesting is and why it’s crucial
- How to set up a backtest on TradingView
- The key metrics to analyze
- How to improve your strategy after backtesting
By the end, you’ll never have to guess whether a strategy is good again. Sound good? Let’s dive in!
What is a backtest and why should you care?
A backtest is when you take a trading system – whether it’s based on indicators, price action, or a mix of both – and apply it to historical market data.
Why? Because as traders, we need a disciplined approach to know when to enter and exit trades. Testing that system in real-time is risky and costly, so instead, we use past price action to see how well it would have performed.
The old way vs. the smart way
Old-school backtesting:
- Manually scrolling through charts
- Writing down every entry and exit in a spreadsheet
- Crying when you realise you wasted hours for bad results
Modern backtesting (using TradingView and Alpha Leonis):
- Automated testing in seconds
- Built-in TradingView Strategy Tester does the math for you
- Lets you optimise your system without stress
This is where Alpha Leonis comes in. It’s a game-changer for traders looking to validate their strategies without wasting time.
How to backtest on TradingView (step-by-step guide)
Step 1: Choose your asset & timeframe
Before anything else, decide:
- What market are you trading? (Forex, crypto, stocks, indices, etc.)
- What timeframe suits your strategy? (Scalpers = 1-5 min, Swing traders = 1H–1D)
For this example, let’s say we’re testing BTC/USDT on a 1-hour chart.
Step 2: Set up your trading strategy
There are two ways to do this:
- Using Pine Script (for the coders out there)
- Using a strategy builder (for those who just want results, fast)
Pro tip: If you’re not into coding, the Alpha Leonis Trading Strategy Builder lets you test any indicator without writing a single line of code.
Step 3: Open the TradingView strategy tester
Head over to the bottom panel in TradingView and click on Strategy Tester. This is where the magic happens.
Step 4: Define entry & exit conditions
Your buy and sell signals should be based on a solid trading plan. Example:
- Buy when RSI is below 30
- Sell when RSI is above 70
Once your rules are set, TradingView will automatically execute trades in the backtest and show the results.

Step 5: Analyse the results (the fun part!)
Now, let’s see how profitable (or disastrous) the strategy is.
Key backtesting metrics in TradingView
TradingView spits out a ton of data, but here’s what actually matters:

- Net profit (%) – the holy grail
How much money would this strategy have made over the backtest period?
Example: +136% in a year. Not bad!
- Win rate (%) – how often you’re right
A high win rate is great, but it’s not everything. A strategy can have a low win rate but still be profitable if the risk-reward ratio is strong.
Example: 85% win rate (7 trades, 6 wins, 1 loss).
- Max drawdown (%) – the pain meter
How much did the strategy lose at its worst point? This tells you the risk level.
Example: 22% max drawdown.
- Profit factor – is it worth it?
Tells you how much money you made for every dollar lost.
Example: A profit factor of 3 means you made $3 for every $1 lost.
- Average trade profit (%) – small wins add up
How much profit does each trade generate on average?
Example: 15% per trade.
How to improve a trading strategy after backtesting
So, what if your backtest results are meh? Don’t worry—it happens. Here’s how to refine your strategy:
- Analyze Losing Trades – What went wrong? Could filters have helped?
- Adjust Stop Loss & Take Profit – Maybe you’re stopping out too early.
- Filter Out False Signals – Adding an extra confirmation indicator can help.
- Optimise Trade Frequency – Too many trades? Not enough? Find the balance.
Pro Tip: If the backtest shows a strategy is only slightly better than “buy-and-hold,” it might not be worth trading actively.
Final thoughts: why backtesting = trading superpower
If you take one thing away from this, let it be this:
Backtesting on TradingView with Alpha Leonis lets you trade with confidence.
No more guesswork. No more impulse trades. No more “I hope this works.”
By testing and refining your strategy before risking real money, you set yourself up for long-term success.
Want to skip the coding? Try the Alpha Leonis Trading Strategy Builder for a fast, code-free way to backtest your strategies.
Now go forth, test wisely, and may your trades be ever in profit!