Tradelyze

FAQ

Trading strategy backtesting and prop firm FAQ

Last updated 2026-09-16·Tradelyze

This FAQ answers 87 questions traders keep asking about whether a backtested trading strategy can be trusted, from sample size and overfitting to TradingView quirks and prop firm rules. It's written for traders who already have a strategy, often a TradingView Pine Script one, and a backtest they aren't sure about.

The questions come from discussions that keep coming up in trading communities such as r/algotrading, Elite Trader, Forex Factory and Trade2Win. Every answer stands on its own, and most link to a longer explainer. The last section is about Tradelyze itself. Platform settings and prop firm terms change, so check the current version before you rely on a detail.

Start here: is my strategy any good?

For traders who have a strategy and a backtest and want to know whether to trust it. Start here, then read about the individual metrics.

I have a strategy with a good backtest (maybe AI-written). How do I know if it's actually any good?

You can't tell from the backtest alone. You find out by trying to break the strategy, and only one that survives has earned a small live test. Code that compiles, whether you wrote it or an AI did, has only proven that it runs. Work through these checks in order, and fix anything that fails before you move on:

  1. Rule out bugs. Look for look-ahead (for example request.security() with lookahead on and no [1] offset), repainting, and commission or slippage left at zero (how look-ahead leaks future data).
  2. Count the trades. Fewer than about 30 tells you almost nothing (how many trades a backtest needs).
  3. Add realistic costs and see whether the edge survives.
  4. Nudge each parameter. If a length of 20 works but 18 and 22 don't, you've fitted noise (plateau vs spike).
  5. Test on data you didn't tune on, ideally with walk-forward analysis.
  6. Split the results by year. One great year and four flat ones isn't an edge.
  7. Delete your best 2% of trades. On 200 trades that's the top 4. If the profit disappears, a few lucky trades were carrying it.
  8. Run a Monte Carlo simulation to see how much deeper the drawdown could plausibly get.
  9. Compare with buy-and-hold on the same instrument and dates.
  10. Go live at small size and compare your real fills with the backtest.

For a Pine strategy, Tradelyze can help with steps 4, 5 and 8. It reruns your backtest from your Pine code and a market-data CSV you upload, checks the rerun against your TradingView trade export, then runs walk-forward, parameter-sensitivity and Monte Carlo checks (what the robustness score measures). Step 1 is still on you: matching TradingView's trades shows the rerun is faithful to your script, not that the script is bug-free.

Is backtesting actually useful, or does it only prove my code follows its rules?

Yes, but mostly for killing bad ideas cheaply, not for proving good ones. A backtest can sink a weak idea in an afternoon, before it costs you money, and it catches logic errors like an entry firing a bar late or a stop that never triggers.

What it can't do is prove future profit. How much a good result means depends on how many trades sit behind it, whether the costs are realistic, and how many versions you tried first. Two hundred trades with honest costs and settings you never tuned deserve a closer look. Forty trades from your fifteenth tweak mostly don't (overfitting and sample size).

Both forum extremes get it wrong. Calling backtests useless throws away the cheapest filter you've got, and treating a great backtest as a great strategy ignores that you built it with hindsight. Use it as the first of several filters: the backtest, then walk-forward analysis, then forward testing on new data, then real money at small size. Each stage catches things the one before it missed.

My backtest shows a near-straight equity curve, a 90%+ win rate or 1000%+ a year. Is it real?

Probably not, at least not as shown. Treat numbers like that as a bug or a hidden risk until you've ruled both out. Plain overfitting tends to make results look good, not impossible, so extremes like these more often mean future data leaked in, costs were left out, or big losses are hiding in the payoff shape. For scale, 1,000% a year means 11x your money every year, which would turn $10,000 into about $13.3 million in three years.

Check in this order:

  1. Look-ahead. TradingView's repainting docs say request.security() with lookahead on and no [1] offset “will return data from the future on historical bars” (how that leak works). Its strategy FAQ adds that with calc_on_order_fills on, a script can use a historical bar's confirmed prices before that bar would really have closed.
  2. Same-bar exits. On historical bars, TradingView doesn't know the order of prices inside a bar. It assumes the high came first if the bar opened nearer its high, and the low first otherwise. Bar Magnifier (Premium and Ultimate plans) uses lower-timeframe bars instead, and that can turn a stopped-out trade into a winner or the reverse.
  3. Costs. Zero commission and slippage flatter systems with small targets the most.
  4. Chart type. TradingView's strategy docs say results on Heikin Ashi, Renko and other non-standard charts “do not reflect actual market conditions by default”.
  5. Sample. A few dozen trades, or one hot asset in a single bull run, proves little (how many trades you need).
  6. Payoff shape. A huge stop with a tiny target buys a high win rate, but one rare loss can wipe out months of wins (why that blows up).

If it survives all six, paper trade it and compare every trade with what the backtest says it would have taken. There are more warning signs of an inflated TradingView backtest worth checking too.

My strategy has a high win rate and profit factor but doesn't beat buy-and-hold. Is it any good?

It can be, but win rate and profit factor aren't the test. The test is risk-adjusted return compared with simply holding the same instrument over the same dates. On an asset that tripled, most long strategies make money, so being profitable proves very little.

Compare the two on return, maximum drawdown, Sharpe ratio and time in the market. Say buy-and-hold made 150% with a 35% drawdown, and your strategy made 90% with a 12% drawdown while in a trade 40% of the time. You gave up some return for far less pain, and your money was free the other 60% of the time. That can be the better deal. If you made less and fell about as far, it isn't.

For a rough luck check, take your daily returns (zero on flat days), divide their average by their standard deviation, and multiply by the square root of the number of days. That's a t-statistic. Below about 2, you can't tell the edge from luck, and if you tried lots of variants the bar is closer to 3 (why). Run the same sum on the daily difference between your strategy and buy-and-hold to see whether you really beat it.

What annual or monthly return is realistic for a trading strategy, and does anyone actually make money with algos?

There's no honest single number, and anyone who quotes one without asking how much risk you're taking is guessing. You can still sanity-check a target. 3% a month compounds to about 43% a year, and 5% a month to about 80%, so those “modest” monthly goals aren't modest at all.

Returns also don't arrive on a schedule. A strategy that makes 20% in a year might have four losing months and get most of its gain from two good ones. Turning that into a daily target (about 0.07% per trading day) just pushes you to force trades on days with no setup.

Judge any return against its drawdown and against what holding the market did over the same period. On a prop account, your real capital is the loss allowance, not the balance. With a $5,000 max loss on a $100,000 account, a $2,500 losing month is only 2.5% of the balance, but it uses up half of what you're allowed to lose (prop firm rules and backtest metrics).

As for algos, some traders and firms do make money with them, but there's no reliable public count of how many. The retail day-trading data is grim, though. A study of everyone who started day trading Brazilian equity futures from 2013 to 2015 found that 97% of those who kept at it for more than 300 days lost money (Chague, De-Losso and Giovannetti). That covers day traders in general, not algo traders specifically.

Someone shows great backtest results for a strategy, indicator or bot. What proof should I ask for?

Ask for enough to rerun the test yourself, and if they won't share that, treat the results as marketing. Anyone credible should answer these without hesitating:

Rerunning matters because results move even when nobody cheats. TradingView's strategy FAQ says “Strategy results can vary over time depending on where the historical data starts.” And US rules make commodity trading advisors and pool operators put a warning right next to simulated results, because such programs “are designed with the benefit of hindsight” (CFTC Rule 4.41).

Is TradingView enough for backtesting, or should I learn Python or use other software?

TradingView is enough for prototyping and for testing a strategy that trades one instrument. Move to Python or other software when you hit a specific limit, not because a thread told you real traders code.

Judge any tool on these:

Tradelyze works alongside TradingView rather than replacing it. It takes your Pine strategy, your TradingView trade export and a market-data CSV you upload, then adds optimization, walk-forward, robustness and prop-firm rule checks. For the concepts behind any of these tools, start at the validation glossary.

Sample size: how much data is enough?

How many trades and how much history you need before backtest or live results tell you anything. The honest answer is usually more than you'd hope, and you need both: enough trades, and enough different kinds of market behind them.

How many trades does a backtest need before the results mean anything?

For a modest edge, plan on a few hundred trades. Thirty is nowhere near enough, and the exact number depends on how noisy your trades are compared with their average.

A win rate's standard error is √(p(1−p)/n), so 55% on 50 trades has a 95% range of roughly 41% to 69%. The t-statistic of your average trade is about your per-trade Sharpe (average trade divided by its standard deviation) times √n. A $20 average trade with a $200 standard deviation gives 0.10, which needs 400 trades just to reach t=2.

The "30 trades" figure is a rule of thumb from intro statistics, not a test for an edge. Trades off the same move aren't independent either, and 300 trades from one trending year mostly tell you about that year. Test 20 unrelated variants with no edge and there's still a 64% chance one clears the usual 5% bar.

Tradelyze's permutation test won't run below 20 trades and its deflated Sharpe check won't run below 5, but clearing those floors doesn't mean you have enough. More in how many trades a backtest needs.

How many years of historical data should I backtest on?

Aim for enough history to give you a few hundred trades across several different kinds of market, not a set number of years.

A day-trading system with 500 trades in the last 12 months has more trades to judge than a swing system with 150 over three years, but it's only seen one year of conditions. You want both: enough trades, plus an uptrend, a downtrend, a long stretch of chop and a volatility shock like March 2020. For most strategies that's several years. For a slow daily or weekly system, 10 or more isn't overkill.

Long history pays off when you split it up. Check each year on its own, because one figure blended over 12 years can hide a strategy that made all its money in two good years.

Tradelyze runs on the OHLCV file you upload, so the history you can supply is the limit. Its Min Backtest Length check compares the years in that file with the years your Sharpe ratio needs, given how many settings the search tried.

My strategy looked great over the last few months (or days) but mediocre over 10 years. Which result do I believe?

Usually the 10-year result, because it rests on far more trades and more kinds of market. A great few months is often just one friendly regime.

QuantNomad showed this on TradingView. A strategy posted a profit factor above 2 on 105 trades from under five months of data. Rerun with Deep Backtesting from January 2012, it came out at 1.35 on almost 3,000 trades (their write-up). The recent stretch wasn't fake, just unrepresentative.

Don't average the two, and don't pick the window you like best. Break the long test into yearly chunks and see where the recent result sits. If the profit factor ran 1.1 to 1.4 most years and 2.5 lately, that's a good patch, not a new normal. Sometimes the market really has changed and leaning on recent data is fair. Just decide which window counts before you see the numbers, not after.

A few great days tell you almost nothing. That's only a handful of trades.

My strategy only trades a few dozen times a year. How can I ever prove it works?

You can't prove it from a year or two of trades, and no statistical trick changes that. You can collect more independent trades and live with wider uncertainty until you have them.

Bootstrapping 25 trades just resamples the same 25 trades. It shows how wide your uncertainty is but doesn't shrink it.

What actually helps:

A bigger edge does need fewer trades. At a per-trade Sharpe of 0.3, about 45 independent trades reach a t-statistic of 2 and about 100 reach 3 (the math). Don't assume your edge is that big just because the backtest says so, and keep size small while the sample grows.

How many live or paper trades does it take before the results mean anything?

Roughly the same few hundred trades a backtest needs, so a few weeks of live or paper trading rarely confirms or kills an edge unless you trade very often. Use that early stretch to check execution instead.

A Sharpe ratio runs on calendar time, and the math is harsh. On daily returns, the standard error of an annualized Sharpe ratio is roughly 1 divided by the square root of the years of data, assuming well-behaved, independent returns (see Andrew Lo's 2002 paper). After three months that's about 2, so a true Sharpe of 1.5 could show anything from −2.4 to +5.4. Three good weeks then two bad ones fits a real edge. It fits a dead one too.

What early live trading can tell you fast:

Overfitting, curve fitting and bias

A backtest can look great because it fitted noise in the past, or because it used information it couldn't have had at the time. These answers cover how to tell which one you're looking at, and what to do about it.

How do I actually know if my backtest is overfit?

You can't prove a backtest isn't overfit, but overfit strategies tend to fail a handful of cheap tests, so run them before you trust the equity curve.

Long history doesn't protect you either. Fifty years of data can still be overfit if you tried 5,000 variants on it, so count every variant. Passing all of these is evidence, not proof. More on spotting overfitting and walk-forward analysis.

What's the difference between optimizing a strategy and overfitting it?

Optimizing means choosing parameter values. Overfitting is when those choices fit the noise in your sample instead of something that repeats, so they fall apart on data you haven't seen.

Every strategy with a number in it has been optimized, whether or not you ran an optimizer. If you picked a 20-period moving average because it looked right on the chart, you optimized. So the useful question isn't whether you tuned. It's how hard you searched and whether the result held up.

Signs you're on the healthy side:

The warning signs are the reverse: a fine-grained search over many inputs, a best value whose neighbors lose, and a sharp drop the moment you test new data. What raises the risk most is how many combinations you tried, not whether you tried any.

Only one exact parameter value gives great results and the values next to it lose. Is that overfit, and should I pick the best value or the middle of a range?

Yes, that's one of the strongest overfitting red flags, so don't trade the peak. Find a range of values that all work and pick from its middle.

No market mechanism works at RSI 14 and fails at 13 and 15. A result like that describes one specific price path. Oddly exact values like EMA 97 deserve the same suspicion.

Say a take-profit makes money from 14 to 18 ticks, scores best at 18 and falls off a cliff at 20. Pick around 16, so being slightly wrong still leaves you on the plateau.

A plateau supports an edge but doesn't prove one. It can rest on too few trades, or only exist in one kind of market. Check it even after a walk-forward pass, because walk-forward tests later data, not nearby settings. Tradelyze's robustness score has a parameter sensitivity check, worth up to 20 of its 100 points, that randomly nudges the winning settings, re-runs the backtest and measures how far the average Sharpe ratio drops. It's skipped on searches under 50 trials. More on plateaus vs spikes.

How many parameters or indicator filters can a strategy have before it's overfit?

There's no fixed number. What matters is how many ways you've given the strategy to fit noise, compared with how many independent trades it has to explain.

The combinations grow fast. Four inputs tested at 10 values each is 10,000 combinations. Search those on a backtest with 120 trades and there's a good chance one looks great purely by luck. A 2014 paper by Bailey, López de Prado and co-authors makes the point directly: high backtest performance is easy to get after trying a fairly small number of configurations.

Stacking confirming indicators feels safer, but each filter adds at least one more choice and usually removes trades. You're adding ways to fit noise while shrinking the sample that's supposed to catch it. Forum rules of thumb that cap you at some set number of parameters are preferences, not published thresholds.

Count the hidden choices too: the instrument, the timeframe, the date range and every rule you switched on or off after seeing results. A "two-parameter" strategy picked after trying three timeframes and six filter combinations came out of a much bigger search than two parameters. More in how many parameters is too many.

My longs make money and my shorts don't. Can I just turn off the shorts (or add a filter), or is that overfitting?

You can, but once you make a change because the backtest told you to, that same backtest can't prove the change works.

Dropping the shorts after watching them lose is data snooping, because the result wrote the rule. That isn't cheating, but it makes the long-only version a new idea. Test it on data that played no part in the decision, like a later period or other instruments.

A structural reason helps a lot. Stock indices have drifted upward over long stretches, so a long-only index strategy has a story beyond "the shorts lost in my sample." If you can't name a reason, be more skeptical.

Watch the size of the gain too. A filter that lifts Sharpe from 1.00 to 1.04 is small enough to be noise, and every tweak like this counts as another trial. White's Reality Check and the deflated Sharpe ratio were built to correct for exactly that kind of search. See why a holdout wears out with reuse.

My strategy did great in recent years but lost money in an earlier year. Should I tweak it until that year is profitable too?

No. Tweaking until a known losing year turns profitable just fits the strategy to that year, and it throws away the most honest thing your backtest told you.

First, ask why it lost. Plenty of strategies only work in one kind of market, like a long bull run. If that's the story, either write a regime rule you'd have written without seeing that year, or accept the risk and size for it. A filter that happens to skip that year's bad trades is neither.

A Trade2Win thread on Connors' RSI(2) system for the S&P 500 shows the trap. The 1990 to 2024 test had a very impressive win rate and a smaller drawdown than buy-and-hold, though a much lower annual return. Another member ran 1965 to 1995 and got a 66% win rate, but a net loss and a drawdown of almost 40%. He wrote that "we'd need to add more criteria to stop it tanking as it did back then." Rules added after you've seen the bad stretch will fix that stretch by construction, so they can't tell you anything about the next one.

Walk-forward, Monte Carlo and parameter nudges measure how fragile a strategy is. They aren't a to-do list for rescuing old years. See walk-forward analysis.

If I backtest hundreds of variants (or let a strategy generator or AI mass-produce them) and keep the best, isn't the winner just luck?

Largely, yes, unless you correct for the search. Test enough variants and some will look excellent by pure chance, and the one you keep is usually the one luck helped most.

This is data-mining or multiple-testing bias. Genetic algorithms, strategy builders and AI tools make it worse, because they churn out thousands of candidates cheaply. What helps:

Walk-forward doesn't fix this on its own. Walk-forward 500 variants, keep the best, and you're back where you started. Tradelyze's optimizer is a genetic search too (NSGA-II), and its robustness score includes a deflated Sharpe check, worth up to 15 of 100 points, that counts the distinct settings the run tried. It can't see variants you tested before uploading.

What's the difference between look-ahead bias, data leakage, survivorship bias and curve fitting?

Look-ahead bias and data leakage mean the backtest used information you couldn't have had at the time. Survivorship bias means your symbol list quietly dropped the losers. Curve fitting means you tuned rules to noise in data you were allowed to see.

The fixes differ. The first three need an audit of your code and data. Curve fitting needs out-of-sample testing and an honest count of what you tried. If a simple rule gives a near-perfect equity curve, look for a leak before you blame overfitting.

Optimizing parameters

How to search for better strategy settings without just fitting the past, and how to tell when an optimizer has fooled you.

Which metric should I optimize for: net profit, Sharpe, profit factor, drawdown or a custom score? My optimizer keeps picking settings that barely trade.

No single metric is safe on its own. Whichever one you pick, set a minimum trade count first, because an optimizer finds the cheapest way to push any number up, and for most metrics that means barely trading.

Profit factor and win rate are ratios, and expectancy is an average per trade, so none of them care how many trades produced the number. Two lucky winners can beat 300 ordinary trades. Minimizing drawdown alone rewards sitting out, since a setting that never trades never draws down. Net profit ignores how rough the ride was. Sharpe counts big up-swings as risk just like big down-swings, so it can rank a smoother, weaker strategy above a trend-follower that lives on a few large wins. A custom score helps only if it actually punishes small samples. Otherwise the loophole just moves.

Tradelyze searches profit %, Sharpe and max drawdown together with Optuna's NSGA-II, a multi-objective genetic algorithm. Its recommended settings skip trials with fewer than 5 trades unless none reached 5, and for each prop firm it prefers settings that pass that firm's rules. The weighted blend that orders the trials is a ranking, not a quality score.

I optimized my strategy, it looked great (even on a one-month forward test), then it failed right after. What went wrong?

Most likely the optimizer fit noise in your history, and one month of forward testing was far too short to catch it. A strategy that trades three times a week gets about a dozen trades a month, and a dozen trades can look great by pure luck.

One more trap: if you tweaked anything after that forward month and re-ran it, the month quietly became part of the fit.

If my strategy is only profitable after optimization, is it worthless?

Not necessarily, but it's a warning sign: optimization should sharpen an edge that's already there, not conjure one up.

Every strategy has settings and somebody chose them, so "never optimize" isn't really an option. What matters is how much the result depends on the exact values. Run it with sensible untuned inputs, the ones you'd have picked before seeing any results. If those lose money and only a narrow band of tuned values makes money, the edge probably lives in noise. If the untuned version is around break-even or a bit positive, and tuning improves it across a broad range of nearby values, that's much easier to believe.

Be honest about searching you've already done without calling it optimization. If this is your fifth idea, or you picked the "default" length after eyeballing a chart, you've already searched, just by hand. See overfitting and sample size.

Before it optimizes, Tradelyze runs a baseline backtest with your Pine Script's default inputs, so you can put the untuned result next to the optimized one.

Should I optimize my stop loss and take profit values?

You can, but treat stops and targets like any other parameter: they overfit just as easily, and tight ones are where bar-based backtests are least reliable.

OHLC bars don't record whether the high or the low came first, so TradingView's broker emulator has to assume an order. Its Pine Script docs say that if the open is closer to the high, price is assumed to go open, high, low, close. Otherwise it's open, low, high, close. When a stop and a target both sit inside one bar, that assumption decides the trade (more in the same-candle question). So tuning a tight stop or trailing stop on bar data is partly tuning against the fill model.

One more thing: widening the stop and shrinking the target usually lifts the win rate, but that doesn't mean expectancy goes up with it.

Can TradingView automatically optimize my strategy inputs, or do I have to change them by hand?

On TradingView itself you change inputs by hand. Neither its Pine Script strategy docs nor its plan comparison page lists a built-in optimizer, and its help article on strategies just says you change the parameters in your settings and the results change with them. Third-party browser extensions that automate the clicking exist, but they ride on TradingView's interface, so an update on TradingView's side can break them.

The clicking isn't the real problem, though. Sweep an RSI length from 10 to 30 in steps of 2, a stop from 1% to 3% in 0.5% steps and a target from 2% to 6% in 1% steps, and you've run 275 backtests. The top row may just be the luckiest of 275, which isn't proof of an edge. Use a sweep as a map: find a broad area where results hold up, then test it on data the search never saw with walk-forward analysis.

Tradelyze optimizes your Pine inputs outside TradingView, on the OHLCV file you upload. You fix an input or give it a Min/Max/Step range, add ordering constraints such as fast length below slow length, and set the trial count to Automatic or Custom.

Out-of-sample and walk-forward testing

Out-of-sample testing checks a strategy on data it wasn't tuned on. These answers cover how walk-forward analysis does that, and where it can still fool you.

What is walk-forward analysis, and how is it different from splitting my data into years and tuning?

Walk-forward analysis tunes your strategy on one stretch of history, tests those exact settings once on the stretch right after it, then slides forward and repeats. Only the test stretches count toward the result.

Here's a simple rolling layout on five years of data, tuning on two years and testing on six months:

  1. Window 1: tune on 2020 to 2021, test on January to June 2022.
  2. Window 2: tune on mid-2020 to mid-2022, test on July to December 2022.
  3. Window 3: tune on 2021 to 2022, test on January to June 2023.
  4. Keep stepping six months until the data runs out. You end up with six test pieces covering 2022 to 2024, and you judge them together.

Cutting five years into chunks and tweaking until every chunk looks good is a different thing. Every chunk helped pick the settings, so none of it is unseen. You've just overfit five pieces instead of one. And since each window can settle on different values, walk-forward is really testing your way of picking parameters, not one fixed set.

Tradelyze picks one of two walk-forward checks for each run and labels the one it used. One re-tunes inside every window. The other scores a single fixed set of settings period by period. See how the two differ.

Is walk-forward testing really necessary, or is it overrated? Do I still need a normal backtest first?

Walk-forward isn't overrated, but it isn't proof either. It's one of the most practical ways to see whether tuned settings hold up on data they weren't fitted to, and yes, you should still run a normal backtest first.

It's good at exposing settings that only worked in one stretch of history, or best values that jump around between windows. Two limits matter more than the forum arguments suggest:

Use the normal backtest to check that entries, exits and costs behave the way you expect. Just don't screen dozens of ideas on the full history and then walk-forward the winner on the same data, because the screening already peeked. Trading live at small size is still the final test. More in overfitting and sample size.

How much data should I hold back for out-of-sample, and should walk-forward windows be anchored or rolling?

No split has been proven best, but TradeStation's walk-forward FAQ recommends 20% out-of-sample, within a 10% to 25% range. Anchored and rolling windows are both defensible. The split you pick can change which settings win, so choose it before you look at results.

Tradelyze defaults to 2 rolling windows with 70% of each used for tuning, so its 30% test share sits a little above TradeStation's range. If walk-forward settings are enabled on your account, you can set the tuning share from 50% to 90% and the window count from 2 to 6. You can't switch to anchored. See rolling vs anchored.

If I keep tweaking my strategy after checking out-of-sample results, is it still out-of-sample?

No. Once you change the strategy because of what the out-of-sample results showed, that data has helped build it. It's validation data now, not a clean test.

It happens quietly. You check the holdout, add a filter and rerun, then widen a range and rerun again. Each run looks clean by itself, but by the tenth, the "unseen" data has had a vote in every decision. That's data snooping, a form of selection bias. It isn't look-ahead bias, which is a strategy using information it couldn't have had yet, like acting on a daily close before the day is over.

What helps:

More in overfitting and sample size.

My walk-forward results are much worse than my backtest with the best parameters. Which one is real?

The walk-forward result is usually the more honest estimate. Your best-parameter backtest chose its settings after seeing every bar it's scored on, so treat it as a ceiling, not a forecast.

That gap is roughly the price of not knowing the future, and trying to close it with settings picked in hindsight just overfits harder. A few checks are still fair:

Passing one 4-year/2-year split but failing rolling windows can simply mean that one holdout happened to suit the strategy. If you'd rather trade frozen settings, optimize once, then run them unchanged on new data for a few months before sizing up. See why walk-forward and backtests differ.

After a walk-forward test, which parameters do I trade live, how often should I re-optimize, and is it bad if the best values jump between windows?

Trade whatever your tested procedure would pick. If your walk-forward re-tuned every six months on the prior two years, do exactly that live, because that's what the test measured.

Plenty of traders finish by re-optimizing on all the data. That's defensible, but that exact set has no out-of-sample evidence of its own, so you're trusting the procedure rather than the numbers. There's no agreed re-optimization schedule either, so stick to the cadence you tested.

Jumping values are a warning. If the best EMA length goes 6, 12, 6 across windows, the optimizer is probably fitting noise, unless results barely change between those lengths. Values that cluster together are reassuring.

Tradelyze takes the re-optimize-on-everything route: its recommended settings come from a search over your whole history. A re-tuned walk-forward pass backs the procedure, not those numbers. Its fixed-settings check does score one set, but on periods the search already saw, so read it as a stability check rather than an unseen-data test. With several prop firms selected, that set can even differ from the one you're shown. See which parameters to trade.

What is walk-forward efficiency, and what value is good enough?

Walk-forward efficiency (WFE) is out-of-sample performance divided by in-sample performance, and 0.5, or 50%, is the usual rule-of-thumb pass mark. TradeStation's walk-forward summary help calls 50% or more a successful analysis and compares annualized returns, so a two-year tuning stretch and a six-month test compare fairly. A WFE of 0.5 means the strategy kept about half its tuned edge on unseen data.

Don't read it blindly:

In a re-tuned run, Tradelyze's WF Efficiency is average out-of-sample Sharpe divided by average in-sample Sharpe. A pass needs WFE above 0.5, more than 60% of usable windows profitable, at least one usable window, and no more than half the windows failing to optimize. At the default 2 windows, one surviving window can carry a pass, and none of those rules counts out-of-sample trades, so check Excluded Windows and the Per-Window Results table before trusting it. See what counts as good.

How can I do walk-forward or out-of-sample testing on a TradingView strategy?

On TradingView you do it by hand: limit the strategy to a date range, tune it there, then run the next range once without changing anything. Deep Backtesting, on Premium and higher plans, lets you pick the time range to test, but its help page doesn't describe any walk-forward or out-of-sample mode.

  1. Add start and end date inputs with input.time(), and only allow entries when the bar's time falls inside the range.
  2. Handle exits too. Close anything still open when the range ends, for example with strategy.close_all(), so a trade opened during tuning doesn't finish in the test period. allanster's How To Set Backtest Time Ranges shows how to gate both.
  3. Tune on the in-sample dates only, and write the settings down.
  4. Move the range to the next period and run it once, unchanged. Repeat for each window.

Fractalyst's Deeptest library says it splits a strategy's closed trades into in-sample and out-of-sample windows, which saves some spreadsheet work. It reads one run's trades, though, so it doesn't re-tune anything per window. Check its math before you lean on it.

Tradelyze runs walk-forward on your Pine strategy for you, using the TradingView trade export and OHLCV data you upload. See walk-forward analysis.

Robustness, Monte Carlo and luck

These checks ask whether your results would survive the same trades in a different order, a related market or a bad stretch, or whether they were just luck. None of them proves an edge. What they show is how easily you could be fooling yourself.

What is Monte Carlo simulation actually used for in backtesting?

Monte Carlo in backtesting is mainly a risk tool: it shows how deep the drawdowns and losing streaks in your own trades could have run, and how often they'd have blown an account. It doesn't prove you have an edge.

The name covers a few different methods:

None of them fixes bad inputs. If the trades came from curve-fit settings, all 1,000 runs inherit the curve fit. With 50 to 100 trades, the usual lesson is that your live drawdown could run well past the one in your backtest. More in Monte Carlo simulation and maximum drawdown.

Tradelyze runs 1,000 stationary bootstrap draws. These resample blocks of consecutive trades, so losing streaks tend to survive. The check fails if 20% or more of the draws fall from their peak by more than the total drawdown limit of the firm or custom rule you picked, or 10% if you pick none. The draws come from the optimized settings' trades on the same history the optimizer searched, so treat the numbers as optimistic.

How do I know my good backtest isn't just luck? Is there a significance test, and can random data help?

You can't prove a backtest wasn't luck, but you can measure how easily luck could have produced it. Two things matter most: how many trades you have and how many versions you tried.

Random price data can't show that a strategy works, because there's no edge in it to find. It helps the other way round. If your strategy keeps making money on random series after costs, look for look-ahead bias or fills that couldn't really happen. Sample size bites hard, too. With 25 trades, the average trade has to be 0.4 standard deviations just to reach t = 2.

Tradelyze runs a sign-flip test on the chosen settings' trade P&Ls, without re-running the backtest. It tightens the 5% bar with a Sidak correction for the number of distinct settings the optimizer tried. Under 20 trades it won't run, it can come back inconclusive, and a deflated Sharpe check sits alongside it. See robustness score and overfitting and sample size.

My strategy only works on one symbol or timeframe. Should it work on others to count as robust?

No, a strategy doesn't need to work on every market to be real. But if it holds up on related markets and nearby timeframes, that's some of the best evidence you'll get that it isn't curve-fit.

Start with why it should work. An opening-range setup built around the US cash open has no reason to work on EUR/USD at 3 a.m. New York time, so failing there proves nothing. It should still hold up on markets that share the same logic, and one timeframe up or down. A system that's great on 1H but loses on 45m and 2H is probably fitted to noise.

Watch for two traps:

Tradelyze tests one symbol and timeframe per submission. Checking another means a new submission with that chart's TradingView trade export and price data, which costs another credit.

Does my backtest need to cover bull, bear and sideways markets, and which stress periods should I test?

Yes, you want to see how the strategy did in up, down and sideways markets, and in calm and volatile ones, because the market you go live into may look nothing like your backtest's best stretch.

A long backtest doesn't guarantee that coverage. Five years of steady uptrend is still one regime. Label your history, for example by whether price was above its 200-day average and whether ATR was high or low. Then compare profit factor, drawdown and trade count in each group. If nearly all the profit comes from one group, you're really betting on that regime.

For stress tests, pick the periods that hit your market:

Run one frozen parameter set through all of them. Picking different settings for each regime after the fact is hindsight. You don't need a profit in every period, just a drawdown you could live through in the bad ones. Walk-forward analysis and maximum drawdown go deeper on both.

Metrics, drawdown and position sizing

What win rate, profit factor, Sharpe and drawdown actually tell you about a backtest, and how position sizing changes the numbers you see.

Beyond net profit and win rate, which backtest metrics actually matter?

After net profit and win rate, look at trade count, expectancy after costs, profit factor, max drawdown, a risk-adjusted return like Sharpe, and whether the results hold up across different stretches of the test.

Check how any annual figure was built, too. A Show HN post claimed about 24.85% a year by compounding the average daily return. Commenters pointed out that up 50% then down 50% leaves you down 25%, and one who re-ran it got a Sharpe of 0.067 and a drawdown near 41%.

Tradelyze's Best Metrics card shows Profit, Sharpe (Bar), Sharpe (Daily), Max Drawdown, Win Rate, Profit Factor and Trade Count. It doesn't show expectancy, so work that out from a trial's downloaded trades.

Is a high win rate a good sign? Which matters more, win rate or risk:reward?

No, a high win rate isn't a good sign on its own. What counts is win rate and payoff together, which gives you expectancy: win% × average win − loss% × average loss.

Take a 90% win rate that makes 1 point on winners and loses 10 on losers: 0.9 × 1 − 0.1 × 10 = −0.1 points a trade. Feels great, still loses. A 40% win rate at 2:1 gives 0.4 × 2 − 0.6 × 1 = +0.2R a trade. Breakeven before costs is 1 ÷ (1 + reward:risk), so 33.3% at 2:1, and a 30% win rate needs better than about 2.3:1.

High win rates usually come from small targets and wide stops, or no stop at all, so losses are rare and big. A backtest can easily catch too few of them, and on a prop account one of them can breach the daily limit (see prop firm rules and backtest metrics). Low win rates cost you something else. Over 500 independent trades at 40% winners, there's about a 70% chance of at least one run of 10 straight losses, so make sure you could sit through losing streaks like that.

What is a good profit factor, and when is it suspiciously high?

After commissions and slippage, trader convention calls a profit factor of about 1.3 to 1.5 or better good, as long as it holds over a few hundred trades. Above 3 on an intraday system, suspect curve-fitting. Neither threshold comes from research.

Profit factor is gross profit ÷ gross loss, so 1.5 means $1.50 made for every $1 lost. Before you trust it, check:

If you optimize for profit factor alone, the winner is often a setting that barely trades. Set a minimum trade count before you rank anything.

What is a good Sharpe ratio, and is a very high backtest Sharpe a warning sign?

By trading-desk convention, an annualized Sharpe ratio above 1 is acceptable, above 2 is good and above 3 is exceptional. Those bands mean little until you know how the number was calculated and on how much data.

The same trades give different Sharpe ratios measured per trade, per bar or per day. Annualizing multiplies by the square root of periods per year (√252 is the usual figure for daily stock returns), which assumes each period's return is independent of the last. When returns are positively correlated, that overstates the ratio: Andrew Lo's 2002 paper found a hedge fund's annual Sharpe can be overstated by as much as 65%.

So yes, a Sharpe of 5 or more on a few months of data is a warning. The usual causes are overfitting, lookahead bias, unrealistic fills or just too short a sample. Expect live Sharpe to come in lower. Flat haircuts like "cut it in half" are rules of thumb, not measurements.

Tradelyze shows two figures, Sharpe (Bar) and Sharpe (Daily), measured on different clocks. Sharpe (Daily) is the closer match to figures quoted elsewhere; use Sharpe (Bar) to compare trials inside Tradelyze.

Why does everyone use the Sharpe ratio instead of Sortino or Calmar?

Mostly because Sharpe is the number everyone already knows how to read and compare. It's a communication standard, not proof that it's the best measure.

One popular belief is wrong, though: the Sharpe formula doesn't require normally distributed returns. It's average excess return ÷ standard deviation, and you can compute it on any return series. Normality matters for how you read it. With fat tails or heavy skew, as in option selling or martingale, a fine-looking Sharpe can hide blow-up risk that standard deviation doesn't capture.

The alternatives each fix one thing and bring their own problem:

Read them together rather than picking one. Tradelyze shows Sharpe but not Sortino or Calmar, so download a trial's trades if you want to work those out yourself.

How much max drawdown is too much for a strategy?

Too much is whatever would make you abandon the strategy or break your account's rules, and for most people that's less than they think while looking at a backtest.

If it's too deep, trade smaller: halve a fixed position size and the dollar drawdown roughly halves. Living through it with real money feels worse than it looks on a chart.

Will my live max drawdown be bigger than the one in my backtest?

Probably, yes. Your backtest's max drawdown is the worst stretch on one path through history, not a ceiling, and live trading usually finds a worse one eventually.

"Plan for 1.5 to 2 times the backtest drawdown" is a popular rule of thumb, not a law. Monte Carlo simulation does better: resample your trades many times and plan around a high percentile, like the 95th, instead of the one drawdown you happened to see. Tradelyze's robustness check resamples runs of consecutive trades (a stationary bootstrap), so losing streaks aren't just scattered apart. Its MC Max DD Real→P95 row shows the drawdown your trades actually drew next to the simulated 95th percentile, both rebuilt from the trade list, so don't compare them with the Max Drawdown tile.

Should my backtest compound position size or use a fixed size per trade?

To judge whether a strategy works, use a fixed size per trade. Compounding belongs in projecting what an account might do later, not in measuring the edge.

With fixed size, early and late trades carry the same weight, so in-sample and out-of-sample stretches compare fairly. With percent-of-equity sizing, a trade late in a good run puts far more dollars on the line than one early on, so dollar figures like average trade and profit factor lean toward whatever happened late in the test. Sizing alone can flip the verdict. Alternate a +50% trade with a −40% trade: at a fixed $10,000 you net +$1,000 every pair, but reinvesting everything loses 10% every pair (1.5 × 0.6 = 0.9).

On TradingView, percent of equity sizes the position's value, not what you'd lose at your stop. And initial capital defaults to 1,000,000, which makes percentage drawdowns on a one-contract strategy look tiny. Run Monte Carlo with the sizing you'll actually trade, too.

Tradelyze reruns your strategy with the order size and capital in its strategy() header, not TradingView's Properties tab, so if you changed sizing there, put it in the script before exporting your trades.

How do I size each trade so I only risk 1% of my account, and should I use the Kelly criterion instead?

Divide the dollars you're willing to lose by what one unit loses at your stop: size = (account × 1%) ÷ (stop distance × point value). Full Kelly is far too aggressive for an edge you've only estimated from a backtest.

Say a $50,000 account risks 1%, so $500. MNQ is worth $2 a point, so a 40-point stop costs $80 a contract: $500 ÷ $80 = 6.25, round down to 6. On EUR/USD a standard lot is $10 a pip for a USD account, so a 25-pip stop risks $250 a lot and $500 covers 2.

TradingView's percent-of-equity setting sizes position value, not risk. The Pine strategy FAQ has a fixed-risk example you can copy.

Kelly says risk p − (1 − p) ÷ b of the account, where p is win rate and b is average win ÷ average loss. At 55% and 1:1 that's 10% a trade. It assumes you know your edge exactly and trades are independent. Overestimate the edge and you overbet: twice Kelly drives long-run growth to about zero, while half Kelly keeps about 75% of the growth with much smaller swings. Test any size against losing streaks with Monte Carlo.

Costs, fills and data quality

Commissions, slippage, fill assumptions and data problems are where a backtest drifts furthest from live trading, and the errors usually make the result look better, not worse. These answers cover how to model costs and fills honestly and how to catch bad data before it fools you.

How do I include slippage, commission and spread realistically in a backtest?

Charge commission on both the entry and the exit, add a few ticks of slippage to every market and stop order, then re-run with both costs doubled. If the strategy stops making money at double costs, the edge was too thin to trade.

Here's how fast it adds up on MNQ, where one tick is $0.50. Say a strategy averages $6 a trade before costs. A tick of slippage in and a tick out is $1, and a $2 round-turn commission takes you to $3. That's half the edge gone. Double both and you're at zero.

Tradelyze charges the costs written in your script's strategy() declaration, not what you typed into TradingView's Properties tab. Put realistic costs in the code itself, and export your TradingView trades with those same settings. Then judge the strategy on after-cost expectancy and profit factor.

Are the limit-order fills in my backtest realistic?

Usually they're a bit optimistic, because by default TradingView fills a limit order as soon as price reaches your level, and a live order can get touched without ever filling.

Your order waits in a queue behind everyone who got there first. If price tags the level and turns, the front of the queue gets filled and you don't. The fills you do get lean toward the times price trades straight through and keeps going against you. A backtest that fills every touch books those tag-and-turn winners you'd often miss live.

The fix is to make price trade through your level. TradingView's "Verify price for limit orders" setting, backtest_fill_limits_assumption in strategy(), defaults to 0. Set it higher and a limit order only fills inside the bar once price has gone past it by that many ticks (TradingView strategy properties). Re-run at 1 or 2 ticks. If the profit factor collapses, the edge came from the fill model, not the market.

Mean-reversion entries, scalps and take-profit limits parked at recent highs or lows get hit hardest. Breakout strategies that enter on stop orders mostly dodge this, but they pay slippage instead.

Do I need tick data, or is OHLC bar data good enough for backtesting?

OHLC bars are fine if your strategy acts on the bar close and holds for several bars. If you scalp, use tight or trailing stops, or can have a stop and a target inside the same bar, you need intrabar data or part of the result is a guess.

A bar gives you four prices but not the order they traded in. TradingView's broker emulator assumes open, high, low, close when the open is nearer the high, and open, low, high, close when it's nearer the low. If one bar reaches both your stop and your target, that rule decides which one filled, not the market. Bar Magnifier fills from lower-timeframe bars instead, and the Pine strategies docs list it for Premium and Ultimate plans.

A quick test is to turn Bar Magnifier on and re-run. If the trade list barely changes, bars are good enough for that strategy. Look at the oldest trades separately, though. It can request at most 200,000 lower-timeframe bars (TradingView help), so on a long history the early trades may not get the finer data. Tick data isn't a cure-all either. Trade prints don't show the bid and ask you'd have paid, so a scalp that lives or dies on the spread really needs quote data.

Why do I get different results for the same strategy on different platforms, brokers, data feeds or even repeated runs?

Results differ because a backtest is data plus assumptions, and changing the platform, broker, feed or date range quietly changes some of both.

A plain backtest run twice on identical data should match exactly. If yours doesn't, something changed underneath, like a fresh download, a longer history or an optimizer's random search. In one NinjaTrader forum thread, the same code made roughly $100k, $145k and $165k over six years on three PCs. One reply pointed out how easy it is to download minute data instead of tick data, or pick a slightly different date range.

Compare trade lists, not totals. Find the first trade that differs and look at that bar. Tradelyze does a version of this before optimizing. It asks for your exchange and chart time zones, matches its re-run against your TradingView trade export, and halts if the trades don't match, though you can choose to continue anyway.

What data problems can ruin a backtest (bad ticks, gaps, continuous futures, free data)?

Bad prints, missing bars, time zone mistakes, survivorship bias and continuous-futures adjustments can all add trades you couldn't have taken, or remove ones you would have.

Free data is fine for sketching ideas. Before you trust a result, check the bars behind your biggest winners against a second source. Tradelyze doesn't supply market data. You upload an OHLCV file for the same instrument and timeframe as your strategy, so its results are only as clean as that file. Take it from the same feed and chart settings you backtested on in TradingView, or the re-run may not match your trades.

TradingView Strategy Tester and Pine Script

These are the TradingView-specific reasons a Pine Script backtest can look different from what you'd get trading it live, and usually better. Most come down to settings, repainting or the way the tester fills orders.

Is the TradingView Strategy Tester accurate enough to trust?

It's accurate enough to throw out weak ideas fast, but the report is a simulation built on assumptions, so treat a great one as the best case until you've checked it. A lot of what gets called a TradingView bug turns out to be a setting or the script itself.

The engine's real limits are worth knowing:

On your side, the usual culprits are repainting and lookahead, unrealistic properties and too few trades. Tradelyze re-runs your Pine script on a separate Pine Script backtester and compares the trades with your TradingView export. A match shows the trades reproduce, not that they're realistic. Both engines run over finished historical bars, so a lookahead leak can reproduce perfectly.

What is repainting, and how can I tell if my Pine Script strategy repaints?

Repainting is when a script calculates differently on historical bars than it did in real time, so the signals on a finished chart aren't the ones you'd have seen live. TradingView's repainting docs define it as "script behavior causing historical vs realtime calculations or plots to behave differently."

The docs name the usual causes: reading high, low or close before the bar has closed, request.security() returning unconfirmed values, varip, bar-state variables such as barstate.isnew, timenow, and strategies with calc_on_every_tick = true. To check your own script:

Not all repainting ruins a backtest. A plot that wiggles until the bar closes is often harmless. The damage comes from entries or exits that use information nobody had yet. There's more in repainting and lookahead bias.

Does using request.security() or higher-timeframe data make my backtest peek into the future?

Yes, if you call request.security() with lookahead = barmerge.lookahead_on and don't offset the series by [1]. Historical bars then get higher-timeframe values before those values existed, so a strategy can "know" today's daily close at the open. TradingView's repainting docs say that setup "will return data from the future on historical bars, which is dangerously misleading."

The default, lookahead off, doesn't leak on history, because there it returns only confirmed values. On live bars, though, it can return the higher-timeframe bar while it's still forming, so the script repaints instead. The Pine FAQ calls a 1-bar offset, combined with lookahead on, "the most robust method":

request.security(syminfo.tickerid, "1D", close[1], lookahead = barmerge.lookahead_on)

That returns the last completed higher-timeframe bar, so history and live bars get the same value, at the cost of one higher-timeframe bar of delay. If a win rate in the 90s drops to about a coin flip after you switch, the old number came from the leak, not an edge. Tradelyze asks you to upload the extra timeframe CSVs a request.security() script needs, but nothing in it flags a lookahead leak, so fix the code before you upload.

Why do my strategy results change after I refresh the chart, or overnight when I changed nothing?

Strategy results usually change overnight because TradingView's chart history now starts at a later bar, and on a plain refresh because the script repaints. Neither one is a TradingView bug or tampering.

Your plan loads a fixed number of bars, and the Pine strategies FAQ says the starting point "aligns with the start of the nearest day, week, month or year, depending on the chart timeframe." As new bars arrive, that start jumps forward. The oldest trades drop off, and EMAs and position state recalculate from a different first bar. The repainting docs warn that changes in early bars "can ripple through all the other bars in the dataset." Changes to the historical data itself, such as a stock split, can shift results too, per TradingView's Help Center.

If a refresh alone changes the trades, look for calc_on_every_tick, request.security(), bar-state variables and timenow. Whenever you get a result you care about, export it. The FAQ recommends regular exports for exactly this reason. Deep Backtesting (Premium and up) runs a fixed date range you pick, so its start doesn't drift as new bars arrive, as long as TradingView still has that stretch of history.

Why does my strategy enter one candle after the signal, and what do 'On bar close', 'On every tick' and 'After order is filled' change?

That one-bar delay is normal, not a bug. By default a strategy calculates once, when each bar closes, and a closed bar can't be traded any more, so the earliest a market order can fill is the next bar's open. TradingView's Help Center explains exactly this.

TradingView's newer Script executions menu calls the last two "On realtime bar tick" and "On order fill", and "On bar close" there just means the default calculation. Ticking every box rarely makes a backtest more realistic.

If my stop and target (or trailing stop) are both hit inside the same candle, which does the backtest assume came first, and does Bar Magnifier fix it?

The backtest can't know which came first, so TradingView assumes a fixed path: open → high → low → close if the bar opened nearer its high, or open → low → high → close if it opened nearer its low. That rule comes from the Pine strategies docs, which add that the emulator "assumes that no gaps exist inside each chart bar."

So for a long with both levels inside one bar, the tester books the target if the bar opened near the high and the stop if it opened near the low, whatever really happened. Trailing stops are the most exposed. On that assumed path, a trail can ratchet up to the bar's high and then get hit on the way back down within the same bar. With tight NQ brackets, that one assumption can make or break the report.

Bar Magnifier, which the Pine docs list for Premium and Ultimate plans, uses lower-timeframe bars to work out the order. That's usually closer to reality, but it's still an approximation, and it's capped at 200,000 lower-timeframe bars. TradingView's Help Center warns that "the first trades on the chart might not be affected by the bar magnifier." If switching it on cuts profit sharply, lean toward the magnified number.

Why can I only backtest a few weeks or months on intraday TradingView charts, and does Deep Backtesting fix it?

TradingView caps chart history by number of bars, not by time, so the shorter your timeframe, the fewer days you get. The Pine docs list 5,000 bars for most plans, 10,000 for Essential and Plus, 20,000 for Premium, 25,000 for Expert and 40,000 for Ultimate (checked September 2026, and plans change). NQ trades about 23 hours a day, which is roughly 276 bars on a 5-minute chart, so 10,000 bars covers only about 36 sessions.

Deep Backtesting helps. It's for Premium and higher plans and runs a date range you choose, up to 2 million bars per calculation according to TradingView's Help Center. TradingView still keeps less intraday history than daily, though. Deep Backtesting trades also show up only in the Strategy Report, never on the chart, because chart trades are always calculated without it, on fewer bars. That's why the two sets of numbers disagree.

A few weeks of intraday data rarely gives you enough trades; see overfitting and sample size. Tradelyze doesn't lift the cap for you. It backtests the OHLCV CSV you upload and can't download market data on your behalf, so your test only covers the history you bring.

Can I trust a backtest run on Heikin Ashi or Renko charts?

Not as it stands. Heikin Ashi, Renko and similar charts are built from synthetic prices, so the Strategy Tester can fill orders at prices that never traded. The Pine strategies FAQ says these chart types "are not suited for strategy backtesting or automated trading systems execution, because the prices and time intervals do not match market prices and times."

Heikin Ashi candles are averages, so a fill at a Heikin Ashi open can be well away from where the market actually was. Renko bricks ignore time as well, and TradingView's Renko help page says orders filled at Renko prices "will inevitably be inaccurate."

For Heikin Ashi, set fill_orders_on_standard_ohlc = true in strategy(), which is the "Using standard OHLC" property, so orders fill at real prices. That setting only covers Heikin Ashi. Better still, calculate the Heikin Ashi values in your code and run the strategy on a normal candlestick chart. If a huge profit factor on Heikin Ashi bars shrinks to something ordinary on real candles, believe the real candles.

Do TradingView's default commission, slippage, order size and margin settings make my results look too good?

Often, yes. A Pine strategy simulates no commission and no slippage unless you add them, so every trade looks cheaper than it would be live. Pine's declaration docs give defaults of 0 commission, 0 slippage, 1,000,000 initial capital and a fixed size of one contract, share or unit. That combination also makes drawdown percentages look tiny.

Go through each property before you believe net profit:

Tradelyze runs your script with the defaults in its own strategy() call, so put realistic costs in the code. Then check maximum drawdown against your real account size.

From backtest to live trading

Why live results rarely match the backtest, how to find where the two split, and how to tell a normal bad run from a strategy that's stopped working.

Why does my strategy perform worse live than in the backtest?

Live results usually lag because the backtest was too generous, the edge was never real, or the strategy isn't being traded the way the code trades it. Work out which one before you change anything.

Rerun the backtest with costs a tick or two worse than you expect and see if the edge survives. And don't judge the live account on two weeks. Ten trading days of returns gives a Sharpe ratio with a standard error of about 5 annualized, so a strategy with a true Sharpe of 2 only lands between -3 and 7 about two times in three.

My backtest and forward test don't match. How do I find out why?

Backtest the exact dates of your forward test, then line up the two trade lists and compare every entry and exit by time and price. Any trade that shows up in one list and not the other tells you where to look. The usual culprits:

Tradelyze does the historical half of this check. It re-runs your Pine Script on the market data you upload and sorts trades into Matched, TV Only and BT Only against your TradingView export. It never sees your live fills, though.

Do I need to forward test or paper trade after backtesting, and for how long?

Yes, forward testing is worth doing, but measure it in trades rather than weeks. Three different things get called forward testing:

Paper trading is good at catching plumbing problems: alerts that don't fire, orders your bridge mangles, trades that don't match the backtest. It's poor at proving edge. A strategy that trades twice a week needs 15 weeks to reach 30 trades, and at 30 trades a 55% win rate still has a standard error of about 9 percentage points. That's a small sample. Simulated fills won't show you real slippage or queue position either. So once paper trades match the backtest trade for trade, most people move to the smallest live size their broker or prop firm allows.

Why do my TradingView alerts fire at different times, or trade differently, than the backtest shows?

Most of the time the alert is running an old copy of your script, or the script behaves differently on live bars than on history.

My strategy is losing live. How do I tell a normal losing streak from a strategy that has stopped working?

Compare live results with the range of outcomes the backtest allows, not its average, using limits you wrote down before going live. Mid-drawdown, every loss feels like proof, so those limits have to exist first.

  1. Check execution. Backtest the live dates. If the trades don't match, you've got a fill, cost or code problem, not a dead edge.
  2. Set limits from a Monte Carlo simulation. Resampling the backtest's trades gives a spread of drawdown depths. Pick a cutoff, such as the 95th-percentile drawdown. Resampling single trades breaks up losing clusters, so if your losses tend to bunch together, real drawdowns can run deeper.
  3. Run the streak odds. At a 55% win rate, there's about a 14.5% chance of 7 or more losses in a row somewhere in 80 trades. A streak longer than any in the backtest isn't proof on its own.
  4. Don't re-tune after losses. Tuning on a few bad weeks just fits recent noise.

Edges do fade. In a study of 97 published stock-return predictors, returns were 58% lower after publication (McLean and Pontiff, 2016). So retiring a strategy that's clearly outside its range is normal. Losing streaks works through a full example.

Can I automate my TradingView strategy on a broker or prop firm account?

Yes, but not directly, because Pine Script strategies can't place orders on an exchange themselves. TradingView's Pine strategies FAQ points to the usual route: alerts sent by webhook to an external tool that places the trades. That's either a third-party bridge or your own small server calling your broker's API.

Tradelyze doesn't help with this step. It analyzes historical backtests and doesn't place trades or connect to brokers.

Prop firm challenges

A prop firm challenge is decided by rules your backtest's profit figure doesn't show, like daily loss limits, trailing drawdown and consistency caps. Firms change these terms often, so check the current rules for the exact account you're buying.

My backtest looks good. How do I know whether it would pass a prop firm challenge?

Replay your trades in the order they closed and check each rule in dollars, because a challenge is decided by the path your account takes, not the final number. Check:

Then shift the start date a few weeks either way and reshuffle the trade order with a Monte Carlo simulation, since one historical pass is a single sample. Treat closed-trade drawdown as a floor, too: the list can't see how far a trade dipped while it was open, so the real drawdown was at least that deep.

Tradelyze grades the optimized trials against daily drawdown, total drawdown (static, trailing or two end-of-day versions), profit target, minimum trading days, consistency and minimum trades. It replays closed trades across the whole backtest, so it shares that blind spot and doesn't measure time to target. See prop firm rules and backtest metrics.

How does trailing drawdown work? Does it follow my open profit or only my end-of-day balance, and does it ever stop trailing?

A trailing drawdown keeps your loss floor a fixed dollar amount below the highest point your account has reached, and that floor only moves up. What counts as the highest point depends on which version your firm uses.

Take a made-up $50,000 account with a $2,000 trail, so the floor starts at $48,000. A trade runs to $1,500 of open profit, then you close it flat.

Two catches. A floor that only moves at the close can still be enforced all session: Topstep's Maximum Loss Limit trails the end-of-day balance but is monitored in real time, with unrealized P&L counted. And some programs stop trailing once the floor reaches the starting balance, as Topstep's Trading Combine does, while others trail for the life of the account. Check the terms for your exact account.

Is max drawdown measured from my starting balance or my highest balance? What's static vs trailing, and which suits my strategy?

It depends on the rule: a static drawdown is measured from your starting balance and a trailing one from your highest balance, and the difference only shows once you're in profit.

Say a $100,000 account has a 10% ($10,000) limit and grows to $110,000.

Static rules are kinder to strategies that build a cushion early. Trailing rules, intraday ones especially, punish trades that run well into profit and then close for less, because every give-back from a peak counts. Don't assume a firm uses one type everywhere: FTMO's 2-Step has a static Maximum Loss and its 1-Step an end-of-day trailing one, per its trading objectives as read in September 2026. Maximum drawdown covers how the figure itself is measured.

I failed the daily loss limit even though I ended the day green. Does it count open losses, and when does it reset?

Often, yes: many firms check the daily loss limit against live equity, open losses included, so touching the line once breaks the rule even if the trade recovers and you finish the day green.

The reset runs on the firm's clock, not your chart's. FTMO recalculates at 00:00 CE(S)T: the new floor is the balance recorded at that moment minus 5% of the starting capital on its 2-Step (3% on its 1-Step), and equity, open positions included, can't drop below it, per its trading objectives as read in September 2026. Because a floor like that starts from your balance, a losing trade held through the reset counts against the new day from its first minute. Firms also differ on reset times and on whether the allowance is a share of your starting balance or of that day's opening balance.

A backtest's worst closed-trade day understates all of this. Tradelyze's daily drawdown check replays each day's closed trades, takes the worst dip below that day's opening balance and, by default, expresses it as a share of starting capital, so it can't see dips inside open trades either. See prop firm rules and backtest metrics.

What is the prop firm consistency rule, and why does one big winning day delay my pass or payout?

A consistency rule caps how much of your total profit can come from one trading day, so after a huge day you keep trading until the rest of your profit catches up. With a 30% cap and a $3,000 best day, total profit has to reach $10,000 ($3,000 ÷ 0.30). With a 50% cap, the same day needs $6,000.

Going over the cap often doesn't fail the account. You just can't pass, or can't request a payout, until the ratio is back under the line. The formula varies too. FTMO's Best Day Rule, on its 1-Step Challenge and 1-Step Account, compares your best closed-trade day with the profit from your positive days only, caps it at 50%, and says going over isn't a breach, per its trading objectives as read in September 2026.

The hidden cost is time, because every extra day spent diluting the big one is another day a drawdown rule can catch you. Tradelyze divides your best day by net profit across all days, losing days included, which is stricter than a positive-days formula whenever you've had a losing day. The consistency rule page works through more examples.

How many contracts should I trade for my drawdown limit? Isn't a '$100K account' really much smaller?

Trade the number of contracts your drawdown allowance can survive, which is usually far fewer than the firm's maximum. A "$100K" account with a $3,000 drawdown allowance really gives you $3,000 of risk capital, and every contract you add multiplies your losses against that fixed number.

A quick method, starting from a one-contract backtest:

  1. Divide the daily loss limit by your worst single day.
  2. Divide the total or trailing allowance by your Monte Carlo 95th-percentile drawdown, which is usually harsher than the one path history happened to give you.
  3. Round both down and trade the smaller number.

With made-up figures, a $2,000 daily limit ÷ a $450 worst day gives 4 contracts, and a $3,000 trailing allowance ÷ a $1,150 95th-percentile drawdown gives 2. You trade 2. If the firm trails intraday, leave extra room, because a closed-trade backtest can't see how far open trades dipped. And if the firm runs a scaling plan, the maximum it lists may not be what you're allowed at your current balance. If one mini is already too big, micros help: MNQ is $2 a point against $20 for NQ.

Besides drawdown and profit target, what other prop rules can fail me (minimum days, time limits, news, weekend holding, inactivity)?

Several, and they're easy to miss because a backtest rarely shows them. Depending on the firm and the stage, you may run into:

If your strategy holds over the weekend or trades into a data release and the firm forbids that, your backtest includes trades you couldn't have taken. Filter them out in the script and test again. Tradelyze checks minimum trading days, minimum trades and consistency alongside drawdown and the profit target. It doesn't check time limits, news or weekend rules, even though they appear in a firm's rule details and you can fill them in on a custom rule set.

Why do most traders fail prop challenges? Is the 8-10% target pushing people to over-risk?

Usually it's one of two things: the strategy has no real edge, or it has one and gets traded too big to survive an ordinary losing run. The target feeds the second. A strategy averaging 3% a month needs about three months to reach an 8-10% target at its normal size. Traders who won't wait that long, or can't under a time limit, double or triple their size. That doubles or triples every loss against an allowance that doesn't change, so the account can take only half or a third as many losses in a row.

Other common ways to fail:

So yes, the target tempts a lot of traders into over-risking. A positive expectancy is an average, and the floor only needs one bad run. Losing streaks shows how long those runs get by chance.

My strategy (or bot) passed a prop evaluation. Was it luck, and how do I avoid blowing the funded account?

It might have been, and one pass can't tell you either way. Twenty or thirty trades is a tiny sample, and challenge rules reward a hot streak: a run of early winners can hit the target before the drawdown limit is ever tested. That's also why a setup tuned to pass once can look brilliant and then fall apart.

Before you trust it, test the strategy on a much longer history than the evaluation covered, check it on data it wasn't tuned on with walk-forward analysis, and run a Monte Carlo simulation to see what share of resampled trade sequences would have passed. If only a small share pass, your result owed a lot to the order and mix of trades you happened to get. Overfitting and sample size covers how many trades you actually need.

On the funded account, keep size small enough that a choppy week uses only part of the drawdown allowance. And re-read the funded rules, because they can differ from the evaluation's. FTMO, for one, drops its minimum-trading-days rule once a 2-Step trader is funded.

Are prop firm challenges worth the fee, or are they designed so most people fail? Are funded accounts even real money?

They can be, but only if you price them honestly and read the payout terms like a contract. A firm collects the fee whether you pass or fail and only pays traders who pass and then make money, so the business works even if most buyers never get through. That's how the product is built, and it isn't proof of bad faith.

"Funded" often doesn't mean live money. FTMO, for example, says all the accounts it provides to clients are demo accounts with fictitious funds, traded in a simulated environment. Check what your firm says.

Then do the math. Your expected cost per pass is roughly the fee divided by your chance of passing, so a made-up $150 challenge you'd pass one time in four costs about $600 per pass if every retry costs the full fee. Compare that with trading a small account of your own. Then read the payout split, the minimum days before a withdrawal, any consistency rule at payout and any clause that lets the firm refuse a payout. Tradelyze isn't affiliated with any prop firm.

About Tradelyze

What Tradelyze is, what you need to run it, what it costs, how it handles your data and where its limits are.

What is Tradelyze, and does it use AI or convert my strategy to another language?

Tradelyze is a web app that checks whether a TradingView Pine Script strategy holds up beyond its backtest, before you trade it or pay for a prop firm challenge. It doesn't use AI, and it doesn't convert your strategy into Backtrader or any other language. Your Pine Script itself is what gets backtested.

A run always starts the same way. Tradelyze backtests your script on its default settings and compares those trades with the trade list you exported from TradingView. That's baseline matching. Then it searches for better parameters with NSGA-II, a multi-objective genetic algorithm, and grades the results against the prop firm rules you picked. Walk-forward validation and robustness scoring run in between unless you switch them off.

It's built for traders who already have a Pine strategy and a backtest they want to pressure-test. Pick MyTrade Pvt Ltd, a company in India, runs it, and it's still in beta. The Learn hub explains each check in more depth.

What do I need to use Tradelyze, and where do I get the files?

You need a verified account, a Pine Script strategy that actually places trades, that strategy's trade list exported from TradingView as a CSV, and a CSV of OHLCV candles for the same symbol and timeframe. You also have to be 18 or older.

The setup wizard has five steps:

  1. Basic Info: a name, the symbol, the exchange timezone (required), your chart timezone and the Pine Script file. For futures, a symbol lookup fills in point value and tick size.
  2. Trade history CSV (required): in TradingView's Strategy Report, open the List of Trades tab and click Download. TradingView's export guide shows where the button is.
  3. Market data CSV: candles for the same instrument and timeframe. Tradelyze doesn't hold a market-data redistribution license, so it can't download candles for you. Export them from your data provider, within whatever your license allows, or use TradingView's Download chart data. That only saves the bars loaded on your chart, so scroll back far enough first. If your script calls request.security() or request.security_lower_tf(), you'll also need a CSV for each extra timeframe.
  4. Strategy Options: by default, the run uses the settings already in your script.
  5. Review: pick up to three prop firms, from the presets or your own rules, and submit. Submitting costs 1 credit.

Which markets, instruments and timeframes does Tradelyze support?

Tradelyze accepts a strategy on any instrument you have OHLCV candle data for, because it tests on the data you upload rather than a built-in feed. The app's own symbol examples are EURUSD, BTCUSDT and MNQ1!, so forex, crypto and futures strategies can all be submitted.

Futures get a little extra help. A symbol lookup fills in point value and tick size from a contract table covering equity index, metals, currency, energy, agricultural, crypto and treasury futures.

Your timeframe is whatever your chart CSV uses. If your script pulls other timeframes with request.security(), you can add data at 1, 5, 10, 15, 30, 45, 60, 120, 180 or 240 minutes, or D, W, M, 3M, 6M and Y.

There are two caveats. Tradelyze hasn't yet confirmed its accuracy outside futures. It also hasn't confirmed that extra-timeframe data attaches to the backtest correctly. Whatever you trade, the baseline match rate is your check. If Tradelyze's trades don't line up with your TradingView trades, don't lean on anything that comes after it.

What is baseline matching, and what happens if Tradelyze's trades don't match my TradingView trades?

Baseline matching is the first stage of every run: Tradelyze backtests your strategy on its default parameters and compares those trades with the trade list you exported from TradingView.

The match card shows a Match Rate plus three counts: Matched, TV Only (trades TradingView took that the backtest didn't) and BT Only (the reverse). If the match comes in under 100%, you also get an email.

When the backtest doesn't reproduce your TradingView trades, the run stops with a baseline mismatch before optimization starts. You can press Continue anyway, and it won't cost another credit, but think before you do. Everything after that point gets optimized on a backtest that isn't quite your strategy. First check that your candle data, both timezones and your script's settings match the TradingView chart you exported from.

Two more tools help later. TV Comparable From is the first bar after the strategy's warmup period, so trades from that date on are the fair ones to compare with TradingView. Verify trial lets you run a trial's parameters in TradingView and upload those trades for comparison. You can also download the trade list for trials in the top trials table.

How does Tradelyze search for better parameters, and can I control it?

Tradelyze searches with NSGA-II, a multi-objective genetic algorithm from the Optuna library. It pushes profit % and Sharpe ratio up while pulling maximum drawdown down, all at once.

Those goals conflict, so there's no single best trial. The search produces a Pareto front: trials you can't improve on one goal without giving up another. A weighted score (40% profit, 30% Sharpe, 30% drawdown) then picks a winner from that front and ranks the trials. It's a tie-breaker, not a quality grade.

You can steer it:

If you pick several firms (up to three), the search runs once and every trial is scored against each firm. More trials on a thin sample still overfit, so read overfitting and sample size before you trust a winner.

How long does a Tradelyze analysis take?

By the optimizer's own planning estimate, a full run takes roughly 50 minutes for a strategy with 1-5 inputs and close to two hours for one with more than 30, and real runs can go longer. Every optimization trial, walk-forward trial and sensitivity check is a full backtest of your script on a remote Pine Script backtester, and they run one after another.

That estimate assumes default settings with walk-forward and robustness switched on, one prop firm and about 23 seconds per backtest. That works out to around 130 backtests at the low end and 290 at the high end. Some backtests take over a minute, which stretches it. The optimizer also works on one job at a time, so if another run is ahead of yours, you wait for that first.

You don't have to watch it. Once your run starts, the app shows an estimated time remaining, based on how long its first backtest took, and live progress through Baseline Matching, Optimizing, Walkforward Analysis, Robustness Scoring and Prop Firm Evaluation. You'll get emails at milestones, including when matching finishes and when the run is done.

How should I read Tradelyze's walk-forward result and robustness grade?

Read both as evidence about how fragile a strategy is, not as a forecast. A strategy graded A+ can still fail live.

Walk-forward. By default Tradelyze uses 2 rolling windows, each split 70% training and 30% testing, and you can raise the window count to 6. A pass needs walk-forward efficiency above 0.5 and more than 60% of windows profitable, with at least one usable window and no more than half the windows unoptimizable. At two windows, that means every usable window has to be profitable, and a single surviving window can decide the result. Treat a pass as thin evidence. Walk-forward analysis explains the method.

Robustness. The score out of 100 combines five checks: a Monte Carlo resample of your trades (25 points), a permutation test (25), parameter sensitivity (20), deflated Sharpe ratio (15) and minimum backtest length (15). If a check can't run, the score is rescaled over the ones that did. Grades run from A+ at 95 or more down to F below 40.

The verdict is stricter than the grade. ROBUST needs all five checks to run and pass, plus a score of at least 80. Otherwise 70 or more is ACCEPTABLE, 50 or more is MARGINAL, and anything lower is FRAGILE. So a B+ marked ACCEPTABLE means at least one check failed or didn't run. Open the section to see which, and read robustness score for the detail.

Which prop firms and rules does Tradelyze check my strategy against?

The setup wizard has presets for 17 prop firms, and you can write your own rules if your firm isn't listed or has changed its terms. You can check up to three firms per run.

The presets are FTMO, Topstep, FundedNext, The5ers, E8 Funding, City Traders Imperium, Apex Trader Funding, Blue Guardian, The Funded Trader, Audacity Capital, Lux Trading Firm, Earn2Trade, Bulenox, Elite Trader Funding, MyFunded Futures, Maverick Trading and OneUp Trader. Each one models a single evaluation, usually the first phase. Topstep's is the 50K Combine, and Earn2Trade's is the Gauntlet. OneUp Trader has no rule set of its own in the engine: picking it grades the strategy on Topstep's 50K Combine rules, which the code marks as the closest match, so check OneUp Trader's own limits yourself. You can also save up to 100 sets of custom rules.

Trials are checked against:

Time limits, news-trading bans and weekend-holding rules aren't checked, even where the app displays them. Firms change their rules often, so confirm the current ones before you pay for a challenge. Prop firm rules and backtest metrics maps each rule to the numbers behind it.

How much does Tradelyze cost, and how do credits work?

New accounts get 20 free credits, with no card needed to sign up. After that, credits cost $19 (US dollars) each, and you can buy anywhere from 1 to 1,000 at a time.

Here's what uses credits:

So a strategy submitted against FTMO and Topstep costs 1 credit. Optimizing it again against two other preset firms costs 2 more, and a re-run against only your own rules costs nothing.

Run Optimization is limited to 10 requests an hour. Credits don't expire while your account is active, and payments go through Cashfree. Purchases are final and non-refundable, except to correct a failed, duplicate or unauthorized charge.

Are my Pine Script strategy and trade data private?

Yes, according to Tradelyze's privacy policy: uploaded strategies, market data and trade history aren't shared with any third parties and are used only to run the analysis you ask for. Under the terms, you keep ownership of your Pine Script.

One thing to keep in mind: backtesting means running your code, so your Pine Script is sent to the Pine Script backtester that runs each test. General questions go to [email protected], and data complaints to the grievance officer at [email protected].

What can't Tradelyze do?

Tradelyze tests strategies; it doesn't trade them. It won't place orders, connect to your broker or hold your money, and it isn't financial advice. The company behind it isn't registered with SEBI as an investment adviser or research analyst.

It's also in beta, and it has real limits. Jobs run one at a time and take a while. A run stops if the baseline doesn't match your TradingView trades, unless you choose to continue. The default of two walk-forward windows is thin evidence. The permutation test needs at least 20 trades and deflated Sharpe at least 5, so on a small sample those parts of the robustness score can't give you a real answer. And nobody has confirmed yet that multi-timeframe strategies using request.security() backtest correctly. The Learn hub covers the methods behind all of this.

Keep learning

Most answers above link to a longer explainer. These pages go deeper on each topic:

Still have a question?

If your question isn't answered here, signed-in users can open a support ticket in the app, or you can email [email protected].

Not financial advice

This FAQ is general education about testing trading strategies. It isn't financial advice, and it doesn't recommend any strategy, instrument, broker or prop firm. Backtest results are hypothetical, and a strategy that tested well can still lose money.

Sources