Troubleshooting

This page is organized by what you see, not by what subsystem caused it. Start from the symptom. The causes and fixes follow.

Written By Axiom Admin

Last updated About 1 month ago

Troubleshooting

This page is organized by what you see, not by what subsystem caused it. Start from the symptom. The causes and fixes follow.

When something goes wrong with a strategy, the problem usually falls into one of four categories:

  1. Configuration error β€” something in your YAML, expressions, or settings is wrong

  2. Platform behavior β€” the strategy tester is doing what it is supposed to do, but the result is not what you expected

  3. Realism mismatch β€” the backtest shows something that real trading would not reproduce

  4. Genuine strategy limitation β€” your rules are working correctly, and the results are honest

Knowing which category you are in saves hours of debugging in the wrong direction.


"Strategy Inactive" and the strategy will not run

This is the most common first-run problem. The error table shows red text and the tester produces no trades.

Possible cause

How to check

Fix

Consent checkbox not checked

Inputs tab β†’ look for "Confirm review of strategy properties"

Check the box after genuinely reviewing the Properties tab

YAML syntax error

Error table lists the error with severity and message

Fix the YAML: check indentation, missing colons, unclosed quotes, and invalid characters

Expression compilation error

Error table lists the expression that failed

Check the expression for typos, unrecognized token names, and syntax problems

Schema validation failure

Error table lists the field and the validation rule that failed

Check that required fields are present and values are within allowed ranges

Debugging sequence:

  1. Is the consent checkbox checked?

  2. Read the error table messages β€” they tell you what is wrong and where.

  3. If the error message references a YAML section, re-check that section's structure.

  4. If the error references an expression, check that every token name in the expression exists in either the built-in token list or your custom tokens.


Zero trades when you expected trades

The strategy shows "Strategy Active" in green, but the trade list is empty and the equity curve is flat.

Possible cause

How to check

Fix

Setup never reaches CONFIRMED

Enable expression diagnostics β†’ check the setup's state tokens (<NAME>_CONFIRMED)

Trace the state: is the gate passing? Is the activation expression true? Is confirmation counting?

Direction mode mismatch

Check the Strategy Direction setting

If you defined long entries but the mode is Short Only, those entries are not evaluated. Switch the direction or add entries for the correct side.

Entry conditions never true

Enable expression diagnostics β†’ check the entry's trigger expression

The trigger may be stricter than it feels in prose. Check whether it ever shows true on any bar.

Risk circuit breaker triggered early

Check if trades appear at the start of the window and then stop

A risk limit (max drawdown, consecutive loss days, intraday loss, or order cap) may have halted all entries. Temporarily raise the limits and retest to confirm.

Custom token source is wrong or stale

Enable token diagnostics β†’ verify the token's live values

A correctly named token can still feed bad data. If the source connection is wrong, or the indicator output is flat/na, the expression compiles but the condition never becomes true.

Entry is one-shot and already fired

Check the trade list for a single early trade

One-shot entries (the default) fire once per setup activation. If the entry fired and exited early in the window, it will not fire again until the setup resets.

Limit/stop entry price expression returns invalid value

Enable expression diagnostics β†’ check the price expression value

If the price expression evaluates to na or to a price that is never reached within the expiration window (entry_expire_after_bars), the order is never placed or expires before filling.

Debugging sequence:

  1. Is the direction mode correct for the YAML sections you defined?

  2. Do the schema summary counts match your intent?

  3. Does the expression diagnostics show your entry trigger evaluating as EVAL with reasonable values?

  4. Are the setup state tokens transitioning correctly?

  5. Have any risk limits been hit?


Unexpected trade count (too many or too few)

The strategy is producing trades, but not the number you expected.

Too many trades

Possible cause

How to check

Fix

Entries on GLOBAL instead of a named setup

Check whether entries specify belongs_to_setup

If entries are attached to GLOBAL, they evaluate every bar without setup gating. Assign them to named setups if you want conditional entry windows.

Pyramiding allows many concurrent positions

Check the pyramiding setting in Properties

A high pyramiding limit combined with frequent entry signals will produce many concurrent trades. Lower the limit to match your intent.

One-shot is disabled

Check whether oneShot = false is set on entries

Pyramiding entries fire repeatedly up to the configured max. If you intended a single entry per setup activation, ensure one-shot is enabled (the default).

Too few trades

Possible cause

How to check

Fix

Setup confirmation filtering too aggressively

Check confirmation count and type

A high confirmation count means the activation condition must persist for many bars before entries become eligible. Lower the count or check whether the condition persists long enough.

Cooldown blocking re-entry

Check cooldown_bars on the setup

After a cancel or reset, cooldown prevents re-activation. If cooldown is long relative to signal frequency, the setup misses entries.

Entry cap reached

Check max_entries_per_activation

If the setup limits entries per activation and the cap is low, entries stop firing within the activation window.

Entry expiration too short

Check entry_expire_after_bars on the entry

Non-MARKET orders expire after the configured bar count. In slow markets, the price may not reach the limit within the allotted bars. Increase the value or remove it to let orders work indefinitely.


Results changed without any changes to YAML or settings

You are looking at the same strategy, the same settings, and the same chart β€” but the results are different from yesterday.

Possible cause

How to check

Fix

New bars arrived

Check if the chart has new recent bars since your last test

TradingView recalculates the strategy when new data arrives. If conditions at the end of the window change, the results change. This is normal.

Tokens referencing timenow

Check whether any expressions use TIMENOW

TIMENOW reflects the current wall-clock time when the script recalculates, not the bar's original timestamp. A recalculation on historical data can therefore produce different token values from a prior session.

Bar-state tokens on historical vs. real-time bars

Check for BARSTATE_ISREALTIME, BARSTATE_ISLAST

These tokens are true only on the live bar. On historical bars during recalculation, they are false. If conditions depend on them, historical results will differ.

TradingView data revision

Compare the data source for the symbol

Exchanges occasionally revise historical data. This is rare but can change OHLC values and therefore trade results.

This category is usually platform behavior, not a configuration error. The results changed because the inputs changed.

What to do about it: If the change is small and concentrated in the most recent bars, it is almost certainly a recalculation effect from new data arriving. This is normal and expected. If the change is large or affects trades deep in the history, check whether you are using TIMENOW or bar-state tokens in conditions β€” those tokens are the most common cause of historical recalculation divergence. If you need stable historical results for comparison, avoid tokens that depend on when the script runs rather than what the bar contains.


Expression shows SKIP or NOT_USED in diagnostics

Status

What it means

What to do

SKIP

The expression exists but is not being evaluated on this bar. Its owning setup is not in a state that allows evaluation, or a gate condition is blocking it.

Trace back to the owning setup. Check the setup's state tokens. Check the entry's or exit's gate condition.

NOT_USED

The expression compiled successfully but is not referenced by any active intent.

Check the YAML schema ownership. The expression may be defined on an entry or exit that is not attached to an active setup, or on a direction that is disabled by the current direction mode.

EMPTY

The expression field is blank or was not provided.

If you expected an expression here, check the YAML for the corresponding field.


Custom token shows unexpected value

Symptom

Likely cause

Fix

Token value is always 0

Source is not connected to the correct indicator plot, or the indicator is not on the chart

Re-check the source dropdown in the Inputs tab. Make sure the indicator is actually added to the chart and has data.

Token value looks wrong (e.g., always 1 or always the same number)

Type mismatch β€” a True/False token connected to a Number source or vice versa

Verify the type setting matches the indicator's output type.

Token name collision warning

Another token or built-in token has the same name

Rename the custom token to something unique. The first-registered token wins on collision.


A risk limit halted trading and you did not notice

This is the most subtle problem in the tool, and it wastes more debugging time than any other. The strategy was running, producing trades, and then it stopped β€” not because the entry conditions changed, but because a circuit breaker triggered. There is no popup. There is no special alert. The error table may still say "Strategy Active." Trading just stops.

The reason this is so easy to miss: the symptom looks identical to "the entry conditions stopped being true." You look at the YAML, check the expressions, verify the setup states, and everything seems correct. The strategy should be trading, but it is not. The problem is upstream of all of that β€” a risk limit shut the door before any of your entry logic was evaluated.

How to detect it:

  • Look at the trade list for a point where trades stop appearing mid-window. Note the date and the equity level at that point.

  • Check the strategy's equity curve: was there a drawdown reaching the Max Strategy Drawdown threshold just before trades stopped? Was there a cluster of losing days matching the Max Consecutive Loss Days setting?

  • Look at the fill count for the session where trading stopped. If it matches the Max Intraday Filled Orders setting, the order cap was the cause.

  • Definitive test: Temporarily raise all four risk limits to their maximum values and retest. If new trades appear in the period where trading previously stopped, a risk limit was the cause. Then lower each limit back one at a time to identify which specific circuit breaker triggered.

What to do about it:

  • If the risk limit triggered appropriately (the strategy was actually losing dangerously), the circuit breaker did its job. The problem is not the limit β€” it is the strategy. A strategy that hits a 20% drawdown threshold is telling you something about its risk profile that the equity curve before the halt might have hidden.

  • If the risk limit triggered because of the strategy tester's simulation assumptions β€” for example, simulated slippage caused a deeper drawdown than real trading would, or the intraday order cap was reached because the tester processed more fills on a single bar than real execution would produce β€” adjust the limit to account for the simulation model, or adjust the simulation settings to be more realistic. But be honest about whether you are adjusting for a genuine modeling mismatch or just loosening the limit because you want more trades.

  • If you are building a multi-setup strategy with independent setups that have different risk profiles, remember that the circuit breakers are strategy-level, not setup-level. One bad setup can halt all of them. There is no way to scope a circuit breaker to a single setup.

See Rules & Risk and Settings for details on how risk controls interact with the engine.