Skip to content
TradingTune
TradingView Optimization

How to find your own Supertrend settings

Find Supertrend settings for your own TradingView strategy by testing input ranges and checking the results on held-out data.

On this page

Key takeaways

  • Supertrend settings change how its line responds to price movement, but they do not define a complete strategy.
  • Test the ATR length and multiplier within a fixed strategy, chart, date range and set of cost assumptions.
  • Record each combination and inspect nearby settings rather than relying on the highest-ranked run.
  • Keep later data out of the search and use it to check the unchanged candidate.

How do you find settings for your own strategy?

Find your own Supertrend settings by testing a defined range of inputs in a strategy, keeping the other test conditions fixed, and checking the candidate on data you did not use for the search. The aim is to learn how the settings behave within your rules and assumptions, not to find a pair of values that suits every chart.

A parameter is a value that changes how a calculation or rule works, and the parameters of interest here are the length and multiplier used by Supertrend. The indicator draws a line that responds to price movement and volatility, meaning the extent of price movement over a period.

Before comparing values, write down what that line does in your strategy and which other conditions must be met for a simulated trade to occur. It might form part of an entry condition, an exit condition or a filter that permits another rule to act, and each role poses a different test question.

Record the symbol, chart timeframe, strategy version, testing dates and cost assumptions before changing any input, so a later difference has a clear context. A timeframe is the duration represented by each chart bar, and it belongs in the record because a setting is tested on that particular chart.

What do the Supertrend inputs change?

Supertrend is a trend-following indicator based on Average True Range, and its line combines trend detection with volatility (TradingView, checked 2026-11-19). Average True Range, or ATR, measures the size of price movement rather than its direction (TradingView, checked 2026-11-19).

The ATR length is the lookback used in the volatility calculation, while the multiplier scales ATR when the indicator forms its bands around price. A lookback is the span of past bars used by a calculation, so changing it changes the history that contributes to the line on the chart.

A larger multiplier generally places the basic bands farther from price for the same ATR value, while a smaller multiplier generally places them closer. The final line also depends on prior bands and direction, so a change in the basic bands does not describe every detail of the resulting line.

Length and multiplier work together, which means the effect of changing a multiplier can depend on the length used alongside it in the same calculation. A chart that looks smoother is not proof that its settings suit the full strategy, because the surrounding rules determine how the line affects simulated trades.

What must the strategy contain before you test?

An indicator line alone is not a complete set of trading rules, so describe what causes a simulated entry, what causes an exit and how position size is determined. Also record which directions the strategy permits, then leave those rules unchanged while comparing the input combinations.

Pine Script strategies simulate trades across historical and realtime bars, allowing a user to backtest a trading system (TradingView, checked 2026-11-19). A backtest applies the strategy’s rules to historical data and reports simulated outcomes, rather than providing a record of actual fills.

A script input is a value exposed for the user to change, which makes it possible to compare values without treating each change as a new rule. Pine Script inputs receive values from a script’s Settings and Inputs tab (TradingView, checked 2026-11-19).

Check that the length and multiplier you intend to compare are inputs of the strategy itself, rather than values changed only on a separate chart indicator. If Supertrend is a filter, note the other condition that must occur, and if it governs exits, describe how the rule handles a change in direction.

This written description gives you a way to spot an accidental rule change before interpreting a different result as an effect of the inputs. If the script does not expose the intended values, resolve that limitation before planning a comparison and keep the revised script version in the research record.

How do you set a fair test context?

Choose the chart and historical period before looking at the comparison, then keep the symbol and timeframe fixed while testing the planned input combinations. Record the date range and chart type alongside the strategy version, so the context of each run remains visible when you review the results.

The chart type matters because the prices supplied to a simulation affect its hypothetical trades and can change what the test represents. TradingView states that non-standard charts use synthetic prices for strategy simulations by default (TradingView, checked 2026-11-19).

Commission is a trading fee, while slippage is the difference between an expected price and the price used for a fill in the simulation. Include assumptions for both and keep them consistent across candidates, because changing costs alongside the inputs makes the source of a difference harder to identify.

Also note the strategy’s position sizing and fill assumptions, including any choices that affect how a simulated entry or exit is represented. The guide to modeling slippage and commission covers those cost choices in more detail and helps keep them separate from the input question.

A period can contain distinct market regimes, meaning stretches with different price behavior, so describe the conditions covered rather than selecting dates solely because a favored setting looks attractive. The date range guide discusses that choice and the risk of building a conclusion around a convenient slice of history.

How wide should the input ranges be?

A range sets the lower and upper values to examine, while a step sets the distance between values within that range during the comparison. Write a reason for each boundary before running the search, using the role of the input and the behavior you want to examine rather than a result already seen.

For the ATR length, the range can represent a contrast between shorter and longer lookbacks that make sense for the strategy’s timeframe and intended use. For the multiplier, it can represent a contrast between basic bands closer to and farther from price, without establishing a preferred value in advance.

The step needs to match the input’s valid precision, so check what values the strategy accepts before writing the list of planned combinations. A very fine step creates more combinations and can invite attention to tiny historical differences, while a very wide step can leave meaningful gaps between the values examined.

Keep a copy of the range plan alongside the strategy version, including the reason for each step and boundary, so the search can be understood later. If a candidate lands at a boundary, record that observation rather than silently extending the range until a more appealing historical result appears.

An expanded range is a new research choice, so document it separately and avoid presenting it as though it was part of the original plan. For a fuller treatment of boundaries and steps, use the guide to choosing parameter ranges, then apply its principles to your own Supertrend inputs.

How can you compare combinations by hand?

A parameter sweep is a planned set of tests across input values, and a manual sweep starts with a list of length and multiplier combinations. Enter each combination into the strategy while leaving the chart, dates, rules and assumptions unchanged, then wait for the test to reflect that combination before recording it.

After each run, record the inputs and the observations you chose before starting, rather than keeping only the candidate that happens to rank highest. Include the simulated trade count, the selected comparison metric and a note about the equity path, meaning the simulated account value through the test.

Use a table or research log with a row for every attempted combination, and attach the strategy version, chart context and cost assumptions to the record. Note failed or interrupted runs as well, so a gap in the list is not mistaken for an input combination that was never planned.

When the sweep is complete, compare the record with the original range plan and check whether every intended combination was entered under the same conditions. If a value was entered incorrectly or another setting changed during a run, repeat that comparison under the recorded conditions and note the correction.

The manual work is more than copying a top result: it involves entering values, checking the test context and preserving enough detail to explain the comparison later. A complete record also makes it easier to examine neighboring values without reconstructing the sequence from memory or changing the question after seeing the results.

TradingTune for Chrome

Stop tuning your strategy's inputs by hand.

Add to Chrome, it's free

Free tier, no API keys. A free account is required to run. Not affiliated with TradingView, Inc.

What should you inspect besides the top-ranked run?

A ranking depends on the metric used to sort it, so choose the main comparison measure before the sweep and read it alongside the simulated trades. A metric is a summary of some aspect of those trades, and no single summary describes every feature of a test or its assumptions.

Inspect the trade count as context rather than as a stamp of reliability, because sparse activity provides less detail about how the rules behaved across the period. The minimum trade count guide explains why the amount of evidence needs a separate judgment instead of a shortcut based on a ranking.

Look at neighboring combinations as well as the highest-ranked candidate, including changes to the length and multiplier on either side of the selected values where those values were tested. If nearby combinations produce broadly similar observations, that region may be less dependent on one exact setting in the historical sample.

If a small input change produces a sharply different result, record that sensitivity before selecting a candidate and examine whether a few trades account for the difference. The parameter sensitivity guide provides a deeper treatment of this comparison, including why a single isolated result deserves careful scrutiny.

A broad region is evidence to investigate, not a promise that its behavior will continue in another period or under different assumptions. Inspect the simulated trade list for unexpected entries, exits or gaps in activity, and resolve any apparent script or data issue before treating the ranking as meaningful.

How do you check a candidate on later data?

Split the available history before the search, recording the boundary and the reason for it before examining which input combination appears most attractive. The in-sample period is the data used to compare settings, while the out-of-sample period is later data held back from that selection.

Select a candidate using the planned in-sample review, then leave its inputs and strategy rules unchanged for the later check so the question remains clear. Apply the same cost and fill assumptions, and compare the observations with the questions you wrote down before starting the search.

The later test asks whether the selected setup behaves acceptably outside the data used to select it, under the assumptions documented for the test. It cannot establish what will happen next, and a disappointing check is useful information about the limits of the earlier selection rather than a reason to hide the result.

Overfitting means matching a particular set of past data too closely, so the selected setup may not generalize to other data or different market conditions. Repeatedly adjusting inputs after seeing the held-out result makes that period part of the selection process, weakening its role as a separate check.

If you revise the strategy, document the revision and reserve fresh data for another check where available, rather than describing the old held-out period as untouched. The in-sample and out-of-sample guide explains the split, while your research log preserves both the original candidate and its later observations.

What happens when you test another chart?

A setting selected on one chart answers a question about that strategy and chart, not every symbol or timeframe that could be examined later. Testing another chart can show how the unchanged setup behaves in a different context, but it does not erase the limits of the original historical test.

For a separate check, record the new symbol or timeframe and keep the candidate’s inputs and strategy rules unchanged while you observe its simulated behavior. Changing the inputs at the same time would turn the exercise into a new search, rather than a check of the candidate already selected.

A different timeframe changes the duration represented by each bar, so the meaning of a lookback in chart time changes with the chart. The timeframe guide discusses that distinction and why a comparison needs the chart duration in its written context.

Review cost and fill assumptions for the new context instead of assuming that the original assumptions describe it adequately, and record any changes alongside the observations. If assumptions differ, keep that difference visible when interpreting the comparison rather than attributing every change to the Supertrend inputs.

A weak observation on another chart is a reason to examine the setup and its intended scope, not proof that a different input pair will resolve the issue. If the rules or ranges are revised, give the revision its own record and preserve the unchanged candidate’s results for reference.

What should you record before using the settings again?

Save the chosen inputs with the strategy version and a plain description of the entry, exit and sizing rules that gave those inputs their role. Include the symbol, timeframe, chart type, date ranges, cost assumptions and the metric used for the initial comparison, so the test can be understood later.

Record the full range plan and the reason the candidate was selected, including observations that did not favor the candidate as well as those that did. Note whether neighboring combinations behaved similarly, whether the candidate sat at a boundary and whether sparse simulated trades limited your interpretation of the historical sample.

Keep the in-sample review separate from the later check in the log, and identify any point where you changed the inputs after seeing a result. That distinction helps prevent a period used for further selection from being described as untouched evidence when you return to the research.

Finally, distinguish what the test showed from what remains unknown, including the effect of the assumptions and the limits of the available historical data. A later period can behave differently, so a useful record preserves the reasoning and its caveats without turning a past ranking into a claim about the future.

Sources

TradingTune for Chrome

Stop tuning your strategy's inputs by hand.

TradingTune runs systematic parameter searches on your own TradingView strategy, right inside the chart page. You keep the strategy, you read the results.

Free tier, no API keys. A free account is required to run. Not affiliated with TradingView, Inc.

Share this post