Guide
Strategy optimization
Last reviewed: 26 September 2026·Tradelyze
Strategy optimization is backtesting the same trading strategy many times with different input settings, then keeping the settings whose results look best. Each backtest is called a trial. The more trials a search runs, the more likely its best result fits luck in past prices rather than an edge that will repeat.
In plain English
Changing an RSI length from 14 to 20 in TradingView and re-reading the Strategy Tester is optimization by hand. An optimizer runs those trials automatically and keeps the best. Because the winners were picked on the same prices they are scored on, they must still prove themselves on new prices.
New to this? Start with in-sample vs out-of-sample.
What is trading strategy optimization?
Trading strategy optimization is a search for the best settings of a strategy whose rules stay the same. In Pine Script those settings are the strategy's inputs, such as an RSI length or a stop-loss percentage. In TradingView they appear on the Inputs tab of the strategy's settings. Commission, slippage and order size are different. They are strategy properties, set in the script's strategy() declaration or on the Properties tab, and TradingView strategy properties explains them.
One backtest with one combination of inputs is a trial. The number used to judge each trial is the objective, such as net profit or maximum drawdown. Maximum drawdown is the largest fall from an account peak to a later low. Every combination the optimizer is allowed to try makes up the search space.
A constructed example shows how quickly a search space grows. Suppose three inputs may each take a handful of values:
- RSI length from 10 to 30 in steps of 2, which is 11 values
- Stop loss from 1.0% to 3.0% in steps of 0.5%, which is 5 values
- Take profit from 2% to 6% in steps of 1%, which is 5 values
Testing every combination takes:
Adding a fourth input with 10 values turns 275 trials into 2,750. These figures are arithmetic on invented ranges, not measured data.
Optimization matters for your money because the best trial is chosen on the same price history it is scored on. Its backtest is an in-sample result, measured on the same data used to pick the settings. That makes it the most flattering number the whole search produced. It says little about future trading until the settings are tested on out-of-sample data, meaning prices the search never used.
Why does optimizing a trading strategy lead to overfitting?
Optimizing a trading strategy leads to overfitting because the optimizer keeps whichever settings scored best on one stretch of past prices. Part of every backtest score is luck. Overfitting, also called curve fitting, means settings that describe the random noise in that history rather than behavior that repeats. A setting can look excellent simply because its entries happened to line up with a few price swings that will not come again.
The more settings a search tries, the more chances some get to line up with noise. The search always reports the luckiest one. As a constructed example, suppose 100 settings of a strategy have no real edge and each has an even chance of a profitable backtest. On average about 50 of them would still show a profit, and the best of the 100 could look impressive. That arithmetic is invented to show the effect, not measured data. For a prop firm challenge, it means paying the fee on the strength of a number that was partly luck.
Three signs point to an overfit winner:
- Few trades behind the result. See how many trades a backtest needs.
- A best value surrounded by much worse neighboring values. See plateau versus spike.
- A sharp drop on data the search never used. Tradelyze's held-out test measures it, and so does walk-forward analysis when it re-tunes the settings in every window.
How many trials should an optimizer run, and why do more trials raise the bar?
No published source gives a correct trial count for a trading strategy; the right number balances two opposite risks. With too few trials, a search that learns from earlier trials never gets past its first random guesses. With too many, the best trial becomes more likely to be a lucky fit to past prices.
Traders tend to underrate the second risk. Bailey, Borwein, López de Prado and Zhu studied it in a May 2014 paper in Notices of the American Mathematical Society. The abstract posted with that paper states that the higher the number of configurations tried, the greater is the probability that the backtest is overfit.
Each extra trial is another chance for a setting to match noise. The same Sharpe ratio is therefore weaker evidence as the best of 300 trials than as the best of 30. Overfitting and sample size explains why the trial count, more than the number of inputs, sets that risk.
In Tradelyze, the Optimization trials setting sits in the Walk-Forward & Robustness step of the Run Optimization window. The same panel appears when you submit a new strategy. It can be Automatic or Custom. Automatic sizes the budget from how many inputs your strategy searches, and never runs fewer than 60 trials. Custom takes a number within the range printed under the box. A separate Walk-forward trials setting sets how many trials run inside each walk-forward window. It applies only when walk-forward re-tunes the settings in every window. Tradelyze, not you, picks the walk-forward method: when a strategy qualifies, it scores the search's overall best settings, normally the recommended ones, on periods cut from one run, which costs no extra trials.
Two account conditions change what that setting does. If walk-forward and robustness settings are not enabled for your account, the form is read-only and runs use the platform defaults. If you have never saved the settings, runs use the server's configured values until you do. That server trial count can be smaller than the Automatic budget. Either way, read the trial count in the results card header rather than assuming the form's value ran.
Two things about a small Custom budget quietly weaken a run:
- Every search spends its first 10 trials on random settings before its model proposes any. A small budget leaves few trials for the model to guide, and a budget of 10 trials or fewer would be random search only.
- Any budget under 50 trials skips the parameter-sensitivity check, and the form warns about it. That check re-tests settings close to the winning ones.
A check that does not run shows NOT RUN on the robustness card. The robustness verdict can then be ACCEPTABLE at best; see parameter sensitivity.
A practical order of work helps. Search fewer inputs before adding trials, and fix the inputs you would never change. Write down how many trials produced the result you are about to trade.
What should an optimizer maximize?
An objective is the number an optimizer uses to judge each trial, such as net profit. No primary source names one correct objective for a trading optimizer, but single objectives fail in predictable ways. An optimizer rewards exactly what it is told to reward, so each objective's blind spot becomes the winning trial's weakness.
| Objective | What the winning trial tends to look like | Source |
|---|---|---|
| Net profit | Large position risk and deep drawdowns, because nothing penalizes the path taken to the profit | No primary source; follows from the objective. |
| Profit factor | Settings that barely trade, because two winning trades and no losers outscore hundreds of ordinary trades; see why optimizing for profit factor breaks | No primary source. |
| Win rate | Small profit targets with wide stops, where a few large losses can outweigh many small wins; see win rate and expectancy | No primary source. |
| Sharpe ratio | Settings with few trades can score well, because a short run of steady winners shows little variation | No primary source. |
Scoring every trial on several objectives at once shows the trade-off instead of hiding it. This is called a multi-objective search. A minimum trade count also stops the search from crowning a two-trade fluke. Tradelyze's optimizer searches on profit, Sharpe ratio and maximum drawdown together; profit factor and win rate appear only as results.
For a prop firm challenge, give drawdown the most attention. The firm ends the account at a fixed loss, however profitable the strategy was. Prop firm rules and backtest metrics covers which numbers predict a breach.
What is multi-objective optimization and a Pareto front?
Multi-objective optimization judges each trial on two or more objectives at once instead of one. A trader usually wants higher profit and a smaller maximum drawdown, and those two goals pull against each other. Rather than forcing them into a single number, a multi-objective optimizer keeps every trade-off that is not clearly worse than another.
One trial dominates another when it is at least as good on every objective and better on at least one. The Pareto front is the set of trials that no other trial dominates.
Take three constructed trials. Trial A made 18% profit with a 12% drawdown. Trial B made 11% with a 5% drawdown, and trial C made 10% with a 9% drawdown. B dominates C, because B made more profit with a smaller drawdown. A and B do not dominate each other, because A made more money and B risked less. Both sit on the Pareto front. Choosing between them depends on how much drawdown you can accept.
A Pareto front is useful to a prop firm trader because the firm closes the account at a fixed loss. A trial with less profit and a much smaller drawdown can be the better choice for a challenge. A ranking on profit alone would still put it lower.
How does Tradelyze's optimizer search?
Tradelyze searches with TPE, short for Tree-structured Parzen Estimator. TPE is a Bayesian optimization method: it learns from the trials already run which settings are worth trying next. Tradelyze uses the version built into Optuna, an open-source optimization library. Every trial is a full backtest of your Pine Script, and TPE scores each one on three separate objectives rather than on a single blended number:
- Maximize profit, as a percentage of starting capital
- Maximize the Sharpe ratio, which is average return divided by how much returns swing. The figure used is the bar-by-bar one the report labels Sharpe (Bar) — not the Sharpe (Daily) tile beside it, and not TradingView's monthly-return Sharpe ratio
- Minimize maximum drawdown
Before a trial's profit and Sharpe reach those objectives, Tradelyze scales both down when the trial took more than one trade per ten bars, so a setting that trades far more often than the data can support cannot win on volume alone. Drawdown is passed through unchanged.
TPE has no generations, populations or breeding. It proposes one trial at a time:
- The first 10 trials are chosen at random from your ranges.
- From the 11th trial on, TPE splits the finished trials into a better group and a worse group. With three objectives, it sorts them by Pareto front rather than by one blended score.
- It builds a probability model of the settings in each group and proposes settings that are likely under the better model and unlikely under the worse one. Tradelyze's version models inputs jointly rather than one at a time. Inputs used together on the same trials are modeled as one group.
- That trial is backtested, and its result informs the next proposal.
The Automatic trial budget depends on how many inputs are searched. Every budget starts with 10 random trials; the rest are proposed by the model.
| Inputs searched | Random trials | Trials proposed by the model | Automatic budget | Source |
|---|---|---|---|---|
| 1 to 5 | 10 | 50 | 60 | Tradelyze implementation (see Sources) |
| 6 to 15 | 10 | 80 | 90 | Tradelyze implementation (see Sources) |
| 16 to 30 | 10 | 110 | 120 | Tradelyze implementation (see Sources) |
| More than 30 | 10 | 140 | 150 | Tradelyze implementation (see Sources) |
Tradelyze's Automatic budget is never fewer than 60 trials. A budget of 10 trials or fewer never reaches the model, so its result is the best of a batch of random draws. How grid search, random search, genetic algorithms and TPE compare is covered under Going deeper.
Tradelyze switched from NSGA-II, a genetic algorithm, to TPE on 24 September 2026, so results produced before that date came from NSGA-II. The switch followed an internal comparison on three strategies at the same trial budget, in which TPE reached better settings in 12 of 15 paired runs. That is Tradelyze's own measurement and has not been independently verified. Tradelyze implementation. No primary source.
Tradelyze's recommended settings are chosen from every completed trial, not only from the Pareto front. After the search has finished, Tradelyze orders the completed trials with one combined ranking of the same three numbers: profit, the Sharpe (Bar) figure and maximum drawdown. That combined ranking is not a fourth objective and the search never optimizes it — TPE searches on the three separately, and the ranking exists only to put the finished trials in order, pick the recommendation and fill the Top Trials table. In the ranking, profit and Sharpe count for less when few trades support them. Trials with fewer than 5 trades are left out unless no trial reached 5.
For each prop firm you select, the recommendation is the highest-ranked trial that passes all of that firm's checked rules. When none passes, the highest-ranked remaining trial is shown as the closest attempt rather than a pass. When no prop firm rule set applies, the recommendation is simply the highest-ranked trial.
The combined ranking only puts trials in order. Tradelyze does not display it, and its size is not a quality score. A profitable strategy tested on a handful of trades can rank first with a score close to zero. Judge a trial by its own metrics and its trade count, and judge the recommended settings by the checks that follow the search. Of those, only the held-out test runs these exact settings on data the search never saw; walk-forward analysis answers a different question.
The trial count of a Tradelyze run depends on how many inputs are searched and on the Optimization trials setting. The number that actually ran is printed in the header of the optimization results card, in the form N trials (M feasible).
How should I set Fixed, Min, Max and Step values and ordering constraints?
Set each range to values you would genuinely trade. Use steps large enough that neighboring values behave differently. Fix every input you do not need to search. In Tradelyze these controls are in Step 1: Configure Parameters of the Run Optimization window.
That editor appears when the strategy has no optimization trials yet. It lists every input the search can change.
| Column | What it does | How to use it |
|---|---|---|
| On | A ticked input is searched; unticking it fixes the input at one value | Untick inputs you would never change, which shrinks the search |
| Parameter, Type, Default | The input's name, its kind (int, float, bool or categorical) and the value in your script | Use Default as the starting point for a sensible range |
| Min and Max | The lowest and highest value a searched number may take | Stay within values you would really trade; the form rejects a Min larger than Max |
| Step | The gap between the values tried | Must be positive and no larger than the range; a very small step adds near-identical trials |
| Fixed | The value used for an input that is switched off | Starts at the script default; change it only to hold the input at a different value |
For true-or-false and list inputs, click the values the search may use instead of typing a range. A constructed example: an RSI length with a script default of 14, set to Min 8, Max 30 and Step 2, gives 12 values. The same range with Step 1 gives 23 values, nearly doubling that input's share of the search with lengths only one bar apart.
An ordering constraint keeps one input smaller than another, such as a fast moving-average length smaller than a slow one. In Step 2: Ordering Constraints, a rule reads left < right or left ≤ right. Tradelyze suggests a rule when two input names form a known pair. The pairs are fast and slow, short and long, min and max, low and high, entry and exit, and oversold and overbought.
A suggested rule can be switched off but not deleted, and a rule you add yourself can be removed. The form rejects a rule that compares an input with itself, and two rules that contradict each other.
When a proposed trial breaks an ordering constraint, the optimizer moves one of the two values. It usually raises the right-hand value, so the pair is back in order inside its ranges. An input you fixed is never moved to satisfy a rule. If the Min and Max values make the order impossible, the trial runs as proposed and the rule is not enforced. Check that the two ranges can actually be put in order.
How do I read the Top Trials table?
The Top Trials table lists up to five of the best-ranked trials from the search. It lets you compare the recommended settings with their closest alternatives. Tradelyze ranks them the same way it makes its recommendation, combining profit, Sharpe ratio and drawdown. Profit and Sharpe are weighted by how many trades support them. A losing result is never discounted that way.
Trials with fewer than 5 trades are left out unless no trial in the search reached 5, and identical settings appear only once. If the recommended settings are not among the five, Tradelyze adds them as an extra row at the bottom. The table appears even when no trial passed your firm's rules, so you can see the closest attempts. Clicking a column heading re-sorts the rows; the # column keeps each trial's rank.
| Column | What it shows |
|---|---|
| # | The trial's position in the combined ranking |
| Trial | The trial's number in the order the search ran it, counting from 0: Trial 0 is the first trial the search ran, and Trial 10 the 11th |
| Feasible | YES or NO against the selected prop firm's rules; see what Feasible YES or NO means |
| Profit % | Profit in account currency, with the percentage of starting capital beneath it |
| Sharpe | The same bar-by-bar Sharpe ratio as the Sharpe (Bar) tile on the Best Metrics card |
| Max DD % | The largest peak-to-trough fall in account currency, with the percentage beneath it |
| Trades | The number of closed trades |
| Win Rate % | The share of trades that made money |
| PF | Profit factor: gross profit divided by gross loss |
| First Trade | When that trial's settings placed their first trade |
| TV Comparable From | The first time from which the figures can be compared with TradingView's own; before it, indicators are still filling their history. Tradelyze does not currently fill it, so it shows — on every trial. See what TV Comparable From means |
In the Top Trials table, a PF of 0.00 can mean no winning trades or no losing trades. A trial with no losses has no defined profit factor. Read the Win Rate % beside it, which will normally be 0% or 100% in those two cases.
Clicking a row opens that trial's full settings and four tools. Copy Pine Defaults copies the settings as Pine Script input lines. Download Trades saves the trial's trades as a CSV file. Verify Trial prepares a TradingView re-run. The TradingView Verification panel compares an uploaded TradingView trade list with the trial's backtest trades. Download Trades and the comparison panel need a trade list that was kept for that trial.
| Trial | Profit % | Max DD % | Trades | How the ranking treats it |
|---|---|---|---|---|
| Trial 41 | 14.2% | 6.5% | 212 | Normally ranks higher: a solid result supported by many trades |
| Trial 88 | 31.0% | 18.0% | 9 | Normally ranks lower: more profit, but nine trades earn little weight and the drawdown is large |
Both rows are invented to show the ranking logic and do not come from a real run. For a prop firm trader, trial 41's 6.5% drawdown also leaves more room than trial 88's 18.0% under a firm's loss limit.
What does Feasible YES or NO mean in Top Trials?
Feasible YES means every rule of the selected prop firm's rule set was checked against that trial's trades and passed. Feasible NO means at least one rule failed, or at least one rule could not be checked. A rule normally cannot be checked when that trial's trade list was not kept. The table shows both cases as NO.
Every row normally reads NO when the run had no prop firm rule set to check. A column of NO values is therefore not proof that every trial broke a rule. When you select several firms, the results page still shows one Top Trials table. Its Feasible column follows one firm's rule set, normally the first you selected. Each firm's own card and its Rule Results table show which limit failed; what Qualifies and Not Feasible mean covers that card.
Feasible answers the firm's rules and nothing else. The feasible count in the card header also leaves out trials with fewer than 5 trades. A YES row can therefore be missing from that count. Neither covers evaluation time limits, news-trading restrictions or weekend-holding rules, which Tradelyze does not check. Both are also measured on the same in-sample data the search tuned on.
What does Verify Trial do?
Verify Trial checks whether a trial's result reproduces in TradingView before you rely on it. Tradelyze makes a copy of your Pine Script with that trial's settings written in as the input defaults. It then opens a new strategy draft, named after the trial, with the modified script attached.
You run that script in TradingView, export its trade list, and upload it with matching market data. Submitting the draft costs 1 credit and starts a normal run, beginning with Baseline Matching. Baseline Matching compares Tradelyze's backtest with your TradingView trades.
Before exporting, check that every input on the TradingView Inputs tab shows the value listed in the Verify Trial window. An input written in an unusual form in the script may keep its old default. For a quick comparison without a new submission, expand the trial's row and use Upload TV CSV in the TradingView Verification panel.
A trial that reproduces in TradingView has shown that the backtest is faithful, not that the settings will keep working. The settings are still in-sample. The one check of exact settings on data the search did not use is the held-out test, and it runs each firm's recommended settings, not other trials. Read it and the walk-forward result before trading. If a later check fails, what to do when a strategy fails validation covers what to change and what to leave alone.
Check it on your own strategy
In a Tradelyze report, the optimizer's output is Best Metrics, Recommended Parameters, the Parameter Search Space table and Top Trials. The optimization card header shows how many trials ran. How Tradelyze validates a strategy walks through every card. To judge the whole report, not one tile, use the pre-trade checklist. Tradelyze re-runs an uploaded TradingView Pine Script strategy's backtest on your price data and checks it against your exported trades. It then runs parameter optimization, walk-forward analysis, a four-check robustness score and prop firm rule checks. It does not place trades, give financial advice or guarantee a challenge pass, and it is in beta.
Create an account. Already a user? Open your strategies.
Going deeper
The sections below go deeper: how grid search, random search, genetic algorithms and TPE choose which settings to test, including NSGA-II, the genetic algorithm Tradelyze used before 24 September 2026. You can skip them and still read your own report.
How do grid search, random search, genetic algorithms and TPE differ?
Grid search, random search, genetic algorithms and TPE differ in how they pick the next combination of settings to test. None of them changes the fact that the winner is chosen on past data, so none of them protects against overfitting on its own.
| Method | How it chooses settings | Strength | Weakness | Source |
|---|---|---|---|---|
| Grid search | Tests every combination on a fixed grid of values | Nothing on the grid is missed | Cost multiplies with each added input: 275 trials become 2,750 | No primary source; arithmetic. |
| Random search | Draws combinations at random from the allowed ranges | Tries more distinct values of each input for the same number of trials | Can miss a narrow region of good settings by chance | Bergstra and Bengio, Journal of Machine Learning Research 13, 2012 |
| Genetic algorithm | Starts from a random population of settings, keeps the better ones, then breeds and mutates them into new candidates | Spends later trials near settings that already did well | Needs several generations of trials, and chases whatever the backtest rewards, lucky or not | Deb, Pratap, Agarwal and Meyarivan, IEEE Transactions on Evolutionary Computation 6(2), 2002, for NSGA-II |
| TPE (Bayesian optimization) | Starts with random trials, then models which settings did well and which did poorly, and proposes settings more likely to do well | Uses every finished trial to choose the next one, with no batches to wait for | Chases whatever the backtest rewards, lucky or not, and its model has little to learn from when the budget is small | Bergstra, Bardenet, Bengio and Kégl, Advances in Neural Information Processing Systems 24, 2011 |
Bergstra and Bengio's paper, Random Search for Hyper-Parameter Optimization, reports that randomly chosen trials were more efficient than trials on a grid. They tested machine-learning models, not trading strategies, so read the result as evidence about search efficiency rather than about finding a trading edge.
A genetic algorithm borrows the idea of natural selection. Each round of candidate settings is a generation, and each new generation is bred from the better members of the one before it, with small random changes mixed in.
NSGA-II, short for Nondominated Sorting Genetic Algorithm II, is a genetic algorithm built around the Pareto front. Deb, Pratap, Agarwal and Meyarivan introduced it in IEEE Transactions on Evolutionary Computation in April 2002. It sorts each generation into fronts: first the trials no other trial dominates, then the trials dominated only by those, and so on. It keeps the trials on the best fronts, and favors trials spread out along a front so the search does not crowd into a single trade-off. Tradelyze searched with NSGA-II, through Optuna, until 24 September 2026.
TPE, short for Tree-structured Parzen Estimator, is a Bayesian optimization method. Bergstra, Bardenet, Bengio and Kégl introduced it in 2011, in Algorithms for Hyper-Parameter Optimization. Instead of breeding, it splits the finished trials at a threshold into a better group and a worse group, and fits a probability model to the settings in each. The next trial is a setting with a high probability under the better model and a low probability under the worse one. The 2011 paper judged each trial on a single number. Optuna's version also handles several objectives: with Tradelyze's three, there is no single threshold, so it sorts the finished trials into the better and worse groups by Pareto front instead. It draws random trials until a set number have finished; Tradelyze sets that number to 10. Like Bergstra and Bengio's random-search study, the 2011 paper tested machine-learning models, not trading strategies.
Stage 3 · step 10 of 18. Next in the learning path: Overfitting and sample size
Frequently asked questions about strategy optimization
What is strategy optimization?
Strategy optimization is backtesting the same trading strategy many times with different input settings, then keeping the settings whose results look best. Each backtest is a trial, and the number used to judge trials, such as profit or drawdown, is the objective. Because the winner is chosen on the same history it is scored on, its backtest is the most flattering result of the search and needs testing on unseen data.
What optimization method does Tradelyze use?
Since 24 September 2026, Tradelyze uses TPE, short for Tree-structured Parzen Estimator, as built into the open-source Optuna library. TPE is a Bayesian optimization method: the first 10 trials are chosen at random, then a probability model of which settings did well and which did poorly proposes new settings that are more likely to do well. Each trial is a full backtest of your Pine Script, scored on three separate objectives: maximize profit, maximize the bar-by-bar Sharpe (Bar) figure, minimize maximum drawdown. With Optimization trials set to Automatic, it runs 60 to 150 trials, depending on how many inputs are searched. Before that date Tradelyze used NSGA-II, a genetic algorithm.
What is a Pareto front in trading strategy optimization?
A Pareto front is the set of trials that no other trial beats on every objective at once. With profit and drawdown as the objectives, a trial making 11% with a 5% drawdown beats one making 10% with a 9% drawdown, but not one making 18% with a 12% drawdown. The front shows the real trade-offs, so a trader can pick the risk level a prop firm allows.
Is Tradelyze's recommended trial always on the Pareto front?
No. Tradelyze chooses from every completed trial, not only the Pareto front. After the search ends it ranks trials with at least 5 trades, unless none reached 5, by one combined measure of profit, Sharpe (Bar) and drawdown that weights profit and Sharpe by trade count. That combined measure is never a search objective. For each selected prop firm, the recommendation is the highest-ranked trial that passes that firm's checked rules.
How many optimization trials should I run?
No published source gives a correct number for trading strategies. Tradelyze's Automatic setting runs 60 to 150 trials, depending on how many inputs are searched, and never fewer than 60. Fewer than 50 trials stops the parameter-sensitivity check from running. More trials raise the chance that the best result is a lucky fit. Search fewer inputs, record the trial count, and judge the winner on out-of-sample tests.
Why do more trials increase overfitting risk?
Every extra trial is another chance for some setting to fit random noise in past prices. In the abstract posted with their 2014 paper on backtest overfitting, Bailey, Borwein, López de Prado and Zhu state that the higher the number of configurations tried, the greater is the probability that the backtest is overfit. The same Sharpe ratio is therefore weaker evidence when it is the best of many trials than when it is the best of a few.
Is random search better than grid search for trading strategies?
Random search usually tries more distinct values of each input for the same trial budget. Bergstra and Bengio reported in the Journal of Machine Learning Research in 2012 that randomly chosen trials were more efficient than trials on a grid, though they studied machine-learning models rather than trading strategies. Neither method protects against overfitting, because both pick a winner on the same data they score it on.
Why does Tradelyze leave trials with fewer than 5 trades out of Top Trials?
A handful of trades can produce a spectacular profit or Sharpe ratio by luck alone. Tradelyze leaves trials with fewer than 5 trades out of the Top Trials ranking unless no trial in the search reached 5, and it weights profit and Sharpe by trade count, so a striking result on a few trades counts for little next to a good result on many.
What does Feasible NO mean in Tradelyze's Top Trials table?
Feasible NO means the trial failed at least one rule of the selected prop firm's rule set, or at least one rule could not be checked for that trial, usually because its trade list was not kept. The table shows both cases as NO, and every row normally reads NO when no prop-firm rule set applied. Each firm's own card and Rule Results table show which limit failed.
What happens when I click Verify Trial?
Verify Trial creates a copy of your Pine Script with that trial's settings as the input defaults and opens a new strategy draft with the copy attached. You run the script in TradingView, then upload its trade list and matching market data. Submitting the draft costs 1 credit and starts a normal run that checks whether Tradelyze's backtest matches the TradingView trades.
Should I optimize for profit factor or win rate?
Neither works well alone. An optimizer maximizing profit factor tends to pick settings that barely trade, and one maximizing win rate tends to pick small targets with wide stops, where a few large losses outweigh many small wins. No primary source names a single best objective; combining profit with drawdown and requiring a minimum number of trades avoids the worst of both failures.
Are optimized settings ready to trade?
No. Optimized settings are in-sample: they were picked because they did well on the same prices they are scored on. Check the trade count, see how the settings did on data the search never used, which Tradelyze's held-out test shows, confirm the result reproduces in TradingView, and compare the drawdown with your prop firm's limits before risking money or a challenge fee. Tradelyze does not guarantee that any result will repeat.
Questions about Tradelyze files, credits and accounts are answered in the Learn FAQ.
Sources
- K. Deb, A. Pratap, S. Agarwal and T. Meyarivan, A fast and elitist multiobjective genetic algorithm: NSGA-II, IEEE Transactions on Evolutionary Computation 6(2), April 2002, pages 182–197, DOI 10.1109/4235.996017.
- Optuna documentation,
optuna.samplers.NSGAIISampler, which describes the class as a multi-objective sampler using the NSGA-II algorithm and cites Deb et al. (2002); retrieved 15 September 2026. - James Bergstra and Yoshua Bengio, Random Search for Hyper-Parameter Optimization, Journal of Machine Learning Research 13, 2012, pages 281–305. The study concerns machine-learning models, not trading strategies.
- James Bergstra, Rémi Bardenet, Yoshua Bengio and Balázs Kégl, Algorithms for Hyper-Parameter Optimization, Advances in Neural Information Processing Systems 24 (NIPS 2011), pages 2546–2554. Section 4 introduces the Tree-structured Parzen Estimator (TPE), which models the settings of better and worse trials with two densities and favors settings likely under the first and unlikely under the second. The study concerns machine-learning models, not trading strategies.
- Optuna documentation,
optuna.samplers.TPESampler, which describes the class as a sampler using the TPE (Tree-structured Parzen Estimator) algorithm, states that random sampling is used instead of TPE until a given number of startup trials finish, and cites Bergstra et al. (2011); for its multi-objective version it cites Multiobjective Tree-Structured Parzen Estimator for Computationally Expensive Optimization Problems (DOI10.1145/3377930.3389817) and Multiobjective Tree-Structured Parzen Estimator (DOI10.1613/jair.1.13188); retrieved 26 September 2026. - David H. Bailey, Jonathan M. Borwein, Marcos López de Prado and Qiji Jim Zhu, Pseudo-Mathematics and Financial Charlatanism: The Effects of Backtest Overfitting on Out-of-Sample Performance, Notices of the American Mathematical Society 61(5), May 2014, pages 458–471, DOI
10.1090/noti1105. The printed Notices article carries no abstract; the sentence quoted on this page comes from the abstract posted with the paper in Western Michigan University's ScholarWorks repository, math_pubs/40, retrieved 15 September 2026. - Tradelyze optimization implementation, reviewed 26 September 2026: since 24 September 2026, an Optuna TPE (Tree-structured Parzen Estimator) study, which replaced NSGA-II, created with directions maximize, maximize, minimize over the objective tuple (profit percent, Sharpe ratio, maximum drawdown), where the Sharpe is the bar-sampled, horizon-capped figure the UI labels Sharpe (Bar), not the daily or raw annualized figures carried beside it; the first 10 trials drawn at random before the model proposes any; the inputs modeled jointly rather than one at a time, in groups of inputs used together on the same trials (multivariate and group TPE); trials sorted into better and worse groups by Pareto rank; no generations or populations; profit and Sharpe scaled down before scoring when a trial takes more than one trade per ten bars; the combined ranking applied only after the search, never as an objective; an Automatic Optimization trials budget of 60, 90, 120 or 150 trials for 1 to 5, 6 to 15, 16 to 30 or more than 30 searched inputs, never fewer than 60; runs with no saved settings use the server's configured trial count; the switch from NSGA-II followed an internal comparison on three strategies in which TPE reached better settings in 12 of 15 paired runs at the same trial budget, an internal measurement that has not been independently verified and has no primary source; the recommendation chosen from every completed trial, not only the Pareto front; recommendation and Top Trials ranked on a trade-weighted combination of profit, Sharpe ratio and drawdown with a 5-trade floor; per prop firm, the highest-ranked trial passing that firm's checked rules; Feasible shown as YES or NO; the parameter-sensitivity check skipped below 50 trials; the per-window Walk-forward trials setting used only when walk-forward re-tunes the settings in every window, and the walk-forward method chosen by Tradelyze rather than by the user; the held-out test run on each firm's recommended settings; the Configure Parameters and Ordering Constraints editors; Verify Trial.
- The search-space arithmetic, the 100-setting luck example, the Pareto-front trials and the Top Trials rows on this page are constructed illustrations, not measured data.