Skip to main content

using TradingView's strategy tester with edgeful algos

How to run a backtest on edgeful's algo indicators using TradingView's strategy tester — setup, key metrics, contract types, why results change over time, and how to optimize without overfitting.

Written by Brad
Updated over 2 weeks ago

summary: use TradingView's strategy tester to backtest edgeful algo indicators on continuous contracts, then evaluate results using net profit, drawdown, win rate, profit factor, and MAE — and use win rate ranges in your risk calculator to account for real-world variation.

before you connect a broker and go live with an algo, you want to know how it's performed historically. TradingView's strategy tester lets you run a backtest directly on edgeful's algo indicators so you can see real historical results on your instrument, timeframe, and settings.

this article covers how to set up a backtest, what to look at in your results, how to interpret win rates conservatively, and how to use metrics like MAE for deeper optimization before going live.

opening the strategy tester

once you've added an edgeful algo indicator to your TradingView chart, the strategy tester panel appears at the bottom of the screen. click the Strategy Tester tab to open it.

if you don't see the Strategy Tester tab, make sure you have one of edgeful's algo indicators active on the chart — standard study indicators won't trigger it.

setting up your backtest

use continuous contracts

when backtesting, use continuous contracts (e.g. NQ1!, ES1!, MNQ1!). these give you uninterrupted historical data across contract rollovers, which gives you a more accurate picture of how the strategy would have performed.

when you're ready to trade live, switch to the active quarterly contract (e.g. NQM2026). continuous contracts are for testing only — prop firms and brokers use the quarterly contract for execution. the only time you continue to use the continuous contract for live trading would be accounts with ProjectX.

set your timeframe

use the same chart timeframe you intend to trade on. most edgeful algo indicators are designed for specific timeframes — check the indicator settings for guidance on which timeframe to use.

how much data you can backtest

the amount of historical data available to you depends on your TradingView plan. higher plans give you access to more bars, which means you can test further back in time. if you're on a lower plan and notice your backtest starts later than expected, upgrading your TradingView plan will extend your lookback range.

what to look at in your results

don't just look at net profit. these are the key metrics that actually tell you if a strategy is worth trading:

  • net profit — the total P&L over the tested period. this is the headline number, but it needs context from the other metrics.

  • max drawdown — the largest peak-to-trough equity loss during the period. this tells you how much pain you'd have experienced holding through the worst stretch. a high net profit with a massive drawdown may not be tradeable in practice.

  • win rate — the percentage of trades that were profitable. lower win rates can still be profitable if the average winner is significantly larger than the average loser.

  • profit factor — gross profit divided by gross loss. a profit factor above 1.5 is generally considered solid. below 1.0 means the strategy lost money overall.

  • number of trades — sample size matters. a backtest with 8 trades over 6 months isn't statistically meaningful. look for at least 30–50+ trades before drawing conclusions about the strategy.

  • MAE (maximum adverse excursion) — the worst point against your position from entry to exit, even if the trade eventually became profitable. high MAE on winning trades suggests your entries aren't optimal. low MAE on losing trades means your stops are working as designed.

understanding MAE for optimization

MAE shows the maximum loss your position experienced before it closed — even if it eventually became profitable. a trade entry at 1.2000 that dips to 1.1950 before recovering to 1.2050 has an MAE of 50 pips. this metric reveals entry signal quality and stop-loss placement.

consistent MAE patterns reveal systematic issues with entry timing or position sizing. high MAE on winning trades suggests you're entering late or in noisy market conditions. low MAE on losing trades means your stops are working as designed.

how to use MAE for optimization

step 1: run your strategy through TradingView's strategy tester over 12+ months of historical data. note the average MAE for winning and losing trades separately.

step 2: compare MAE to your profit factor. high-profit strategies often have lower MAE because early entries lead to better risk/reward ratios.

step 3: if MAE is consistently high, adjust your entry conditions — add filters for volatility, trend alignment, or time-of-day. if MAE is high but losses are small, your stops are working; consider tighter stops.

MAE vs. slippage and commissions

MAE doesn't account for slippage or commissions — it's a pure price movement metric. in live trading, your actual max loss will be worse than MAE suggests. account for these costs when setting risk limits.

interpreting backtested win rates

backtested win rates show historical performance but vary month to month. don't use a single number — use a range to plan for real-world outcomes in your risk calculator.

the range approach

if your backtest shows a 66% win rate:

  • conservative: round down to 60% (safer estimate)

  • aggressive: round up to 70% (optimistic scenario)

test both scenarios in the risk calculator. this gives you a realistic range of outcomes.

win rates change month to month

market conditions change, so your win rate will fluctuate. backtest monthly to monitor trends and adjust if needed. backtested win rates are inputs for your risk calculator — validate them regularly and refine your strategy based on what you observe over time.

why your results might look different than before

it's common to run the same backtest a few weeks later and see different numbers. this is normal and expected — as time passes, new price data is added to the chart, which extends the tested period and updates the results.

this isn't a bug. it just means your backtest is always reflecting the most up-to-date data available. a strategy that looked one way in January will include February and March data when you run it again in March — so the numbers shift.

h

ow often to update your backtest

check your backtest results monthly. if you're not seeing any material changes to performance — win rate, drawdown, and profit factor are all holding steady — you can move to a quarterly review cadence.

if you notice a meaningful shift (e.g. a previously profitable session is now dragging results, or drawdown has increased significantly), that's a signal to revisit your settings before the next trading cycle.

optimizing your settings without overfitting

overfitting is when you tweak your settings so specifically to past data that the strategy stops working in live conditions. to avoid it:

  • change one setting at a time — don't adjust multiple parameters simultaneously. isolate each change so you know what's actually improving performance.

  • use small increments — for example, if you're testing max ORB size, move it 0.5 above and below the default and compare results. large jumps make it hard to identify cause and effect.

  • don't remove days or sessions based on small samples — if Wednesday has been slightly negative for 2 months, that's not enough data to justify removing it. look for persistent, multi-month trends before making structural changes.

once you're happy with your backtest results, bring that data into the edgeful algo analyzer for a deeper optimization review before going live.

related articles

Did this answer your question?