TradingView Strategy Properties|Settings Audit | SG Group
Skip to the article
TradingView guide · Content reviewed 日本語で読む
BACKTEST PREMISE · TV11

How to Lock TradingView Strategy Properties for Comparable Backtests

The same Pine strategy can produce materially different Strategy Tester results when initial capital, base currency, order size, pyramiding, margin, commission or slippage changes. This is not a guide to choosing a supposedly best setting. It shows how to record what was fixed in code, what was overridden in the interface and which chart context produced the run, then bind that settings fingerprint to the exported result. Cost calculation and sensitivity testing remain in the dedicated BT09 lesson; the job here is reproducibility.

Who this guide is for: Traders and Pine developers whose Tester results differ across machines, shared copies or reruns, and anyone comparing strategy versions under a controlled premise

Key points to understand first

SETTINGS FINGERPRINT

Name the experiment before reading its result

FINGERPRINTTV11-DEMO · v1 · USD · 100k · 10% · P1 · M100/100
Audit stateReconcile value, unit, source and override

Capital

  • Initial 100,000
  • Currency USD
  • Order 10% equity

Exposure

  • Pyramiding 1
  • Long margin 100%
  • Short margin 100%

Friction

  • Commission 0.05%
  • Slippage 2 ticks
  • Unit verified

Context

  • Symbol ID saved
  • Timeframe saved
  • Session saved
All displayed values are fictional teaching examples. Verify current fields, defaults, units and availability in TradingView’s official interface.
DIRECT ANSWER

Only results with a fixed premise and data context are comparable

Strategy Properties define the premise of a backtest experiment. Initial capital and currency set the reporting and capital base; order size and pyramiding shape exposure; margin changes capital requirements and margin-call behavior; commission and slippage represent assumed friction. Saving only net profit leaves the experiment impossible to reconstruct.

Save the settings record first, execute Strategy Tester second, then bind the result file and record with the same version ID. A statement such as “version B performed better” is interpretable only when symbol, timeframe, date range, session, script hash, inputs and properties are equal except for the one intended change. A different provider or accessible history is a different experiment too.

01 · FOUR LAYERS

Separate capital, exposure, friction and calculation behavior

Treating the Properties panel as one long list hides why a field changed. Grouping fields into capital, exposure, friction and calculation/fill layers makes potential causes traceable. This article records the first three; TV15 covers recalculation timing and TV12 covers the broker emulator and fills.

Responsibilities inside Strategy Properties
LayerRepresentative fieldsWhat can changeEvidence to retain
Capitalinitial capital, currencyPercentage base and funding constraintsValue, currency, rationale
Exposureorder size, pyramiding, marginQuantity, stacked entries, margin callsType, value, direction
Frictioncommission, slippagePost-fill P&LUnit, value, per-fill meaning
Calculation/fillrecalculation and fill settingsOrder creation and execution timingLink to separate audit

Interface labels and grouping can change. Prefer the current official page and the values shown in the actual run.

Ten percent of equity and a fixed quantity of 10 are not interchangeable. Likewise, a 100% versus 20% margin setting changes capital requirements; it is not a direct maximum-loss control. Reconcile actual position risk separately with stop distance, quantity, point value, gaps and contract terms.

02 · REPRODUCIBILITY RECORD

Bind a settings fingerprint to every exported result

A fingerprint here is a compact human-readable identifier, not a cryptographic proof. The complete record stores value, unit, entry point, rationale, whether code fixed it or the UI overrode it, and review date. The short ID belongs in filenames and comparison tables. Preserve text as well as screenshots so differences remain searchable.

Conceptual settings fingerprintFingerprint = script version + inputs + capital/currency + sizing + pyramiding + margin + friction + contextCompleteness = recorded required fields / required fields × 100Review flags = missing fields + suspected UI overridesThis measures record completeness, not strategy quality or profitability.
Minimum settings ledger
FieldFictional exampleUnit/typeSource
initial_capital100000USDstrategy()
default_qty10% of equitystrategy()
pyramiding1same-direction entry capstrategy()
margin long/short100 / 100%strategy()
commission0.05assumed % per fillstrategy()
slippage2ticksstrategy()
contextTICKERID / 60 / regularID, minutes, sessionchart

Values illustrate the recording method and are not recommendations.

03 · PINE V6 EXAMPLE

Reconcile strategy() defaults with the live Properties values

Pine v6 lets a strategy declaration state many default properties. The sample exists only to show explicit settings. pyramiding = 1 records an intent to permit one same-direction entry at a time. Its moving-average cross is a short fictional rule, not evidence of an edge, a recommended length or a directional instruction. The commission and slippage values are fictional too.

Pine Script v6: strategy with an explicit settings premisepine
//@version=6
strategy(
    "Settings fingerprint demo",
    overlay = true,
    initial_capital = 100000,
    currency = currency.USD,
    default_qty_type = strategy.percent_of_equity,
    default_qty_value = 10,
    pyramiding = 1,
    commission_type = strategy.commission.percent,
    commission_value = 0.05,
    slippage = 2,
    margin_long = 100,
    margin_short = 100
)

int fastLength = input.int(20, "Fast length", minval = 2)
int slowLength = input.int(50, "Slow length", minval = 3)
float fast = ta.sma(close, fastLength)
float slow = ta.sma(close, slowLength)

if ta.crossover(fast, slow) and barstate.isconfirmed
    strategy.entry("L", strategy.long)
if ta.crossunder(fast, slow) and barstate.isconfirmed
    strategy.close("L")

plot(fast, "Fast", color.teal)
plot(slow, "Slow", color.orange)

Check the current compiler and official declaration reference before using any argument in Pine Editor.

Source defaults make a shared starting point easier to identify, but a runnable configuration can still differ if the corresponding Properties field is changed. Reconcile source, the live panel and the exported settings information. Assign a new fingerprint whenever an override matters.

04 · CONTROLLED COMPARISON

Change one variable so a result difference has one named cause

Clone a frozen baseline and change one target field. Changing capital and sizing together makes it impossible to separate effects on amount, percentage and trade eligibility. When testing pyramiding, hold other properties, inputs, symbol and period constant, then retain trade count, exposure and margin events alongside the report.

  1. Freeze a baseline

    Save script hash, inputs, properties, symbol, timeframe and date range.

  2. Change one field

    Record the reason, old value, new value, unit, operator and time.

  3. Rerun the Tester

    Export the same CSV/XLSX report type instead of comparing screenshots alone.

  4. Reconcile differences

    Check the settings delta, trades, quantity, capital constraints and warnings in order.

  5. Freeze the version

    Keep failed and unattractive variants so outcome does not rewrite the audit trail.

Varying commission, spread or slippage across scenarios asks a different question. Do not recreate that analysis here; continue to BT09 cost sensitivity and stress testing. TV11 identifies the exact baseline passed into that exercise.

05 · EXPORT & LAB

Pass the CSV/XLSX downstream with its premise attached

After exporting a compatible Strategy Tester CSV/XLSX, store it beside the matching fingerprint. SG Group’s Backtest & Robustness Lab can then provide descriptive diagnostics such as KPIs, equity, drawdown, stress and OOS from the loaded results. When saved analyses and repeatable version comparison become important, the paid workflow is a natural next step.

The free TradingView indicator collection is useful for observation and hypothesis formation, but an indicator plot is not a Strategy Tester strategy export. Convert a precise rule into a separate `strategy()` specification, validate data, fills and execution, then send suitable results to the Lab. Do not relabel an attractive plot as tested performance.

06 · RELEASE CHECK

Audit missing fields and overrides before sharing a result

Fixed settings do not guarantee future performance. Reproducibility is only the minimum condition for asking the same question again. Validate data quality, fills, execution, sample size, costs, OOS and robustness separately. Continue with TV12 for fill assumptions and TV15 for runtime timing.

SETTINGS FINGERPRINT CHECK

Count documentation coverage and override flags

Enter required properties, fully recorded properties, code-declared properties and suspected UI overrides. This checks audit completeness, not performance.

Record completeness%
Code-explicit ratio%
Review flagsitems

Completeness = min(recorded, required) / required; code-explicit ratio = min(code fields, required) / required; flags = missing fields + suspected overrides. A complete record does not prove appropriate settings or a profitable strategy.

Frequently asked questions

Do saved Strategy Properties guarantee an identical rerun?

No. Script version, inputs, symbol ID, provider, timeframe, session, history range and data revisions must also be reconciled. The settings record is the starting point.

What is the correct commission or slippage value?

There is no universal value. It depends on broker, instrument, order, liquidity and time. This article records value and unit; BT09 handles modeling and sensitivity.

Can I skip the Properties panel when values are in source code?

No. Runtime overrides and chart-level context can still differ. Reconcile source, the panel and the run’s exported information.

Must the settings fingerprint be embedded inside the CSV?

No. A human-readable worksheet or JSON sidecar is acceptable, provided it is bound to the CSV/XLSX by the same version ID, run time and script hash.

Primary sources and verification links

  1. TradingView | Strategy propertiesOfficial properties and their relationship to strategy() arguments
  2. TradingView Pine Script | Declaration statementsOfficial strategy declaration and property argument reference
  3. TradingView Pine Script | StrategiesOfficial Strategy Tester, properties, orders, costs and margin concepts
  4. TradingView Pine Script FAQ | StrategiesOfficial FAQ for sizing, leverage and strategy testing
  5. TradingView Pine Script | Execution modelOfficial runtime context that must be separated from economic settings

Edited and published by: SG Group · Editorial approach: We prioritize official TradingView Help Center and Pine Script documentation, then use exchange, regulator and other primary materials for market and product context. Features, data, pricing and connection terms change, so verify the current interface and linked sources before use.

Important notice: This article provides general education about TradingView interfaces, charts, alerts, screeners, paper trading and Pine Script. It is not investment advice, a trading signal, a recommendation of any instrument, data source or broker, or a guarantee of future price or profit. Features, pricing, data, exchange coverage, notifications, order integrations and Pine Script behavior vary by plan, region, connection and date and may change. Before risking money, verify current TradingView documentation and the terms of the relevant data source and connected provider, then rehearse the workflow with fictional data or paper trading.