Pine Script Strategy Shows No Trades? Check These Five Causes
If Strategy Tester says there are no trades, start with the first condition that stops an order. A successful compile only tells you the code is valid; it does not mean an order was placed.
Reviewed and updated September 24, 2026
TradingView's Strategy Tester needs a strategy that actually submits orders. A script can draw buy labels and still leave the report empty. Before changing your trading idea, work through the checks below in order. Keep a copy of your original script so every temporary diagnostic change can be reversed.
1. Confirm this is a strategy with an order command
The first declaration should be strategy(), not indicator(). A plotted arrow, alert, or label does not create a simulated trade. Look for an order command such as strategy.entry() or strategy.order() in reachable code. The entry command must run when the entry condition becomes true.
2. See whether the complete entry condition is ever true
Plot the final condition temporarily. The example below marks bars where a simple moving-average crossover is true. If there are no markers, inspect each part of your real condition separately: trend, setup, confirmation, session, and position state. One permanently false filter is enough to prevent every order.
//@version=6
strategy("Entry diagnostic", overlay = true)
fast = ta.ema(close, 20)
slow = ta.ema(close, 50)
enterLong = ta.crossover(fast, slow)
plotshape(enterLong, title = "Entry condition", style = shape.triangleup, location = location.belowbar)
if enterLong
strategy.entry("Long", strategy.long)Use this as a diagnostic example, not a strategy recommendation. If your real script shows a marker but still places no order, look at capital, quantity, position state, and risk restrictions next.
3. Check the test window, symbol, and timeframe
A date filter can exclude all loaded bars. A session filter can be impossible on the selected symbol or timezone. A long moving average may need more history than the chart currently has. Confirm that the chart has bars inside the intended test window and that the chosen symbol and timeframe actually exhibit the setup. Do not loosen your rules just to manufacture trades; use temporary diagnostics to locate the blocker.
4. Check order size and available capital
Strategy settings can prevent an otherwise valid order if the quantity cannot be funded or the symbol's contract value is larger than expected. Review initial capital, default quantity, explicit qty, and the symbol's point value where relevant. TradingView's Strategy Tester and runtime messages can help distinguish an unfunded order from an entry condition that never fired.
5. Inspect position state, pyramiding, and exit logic
A condition such as strategy.position_size == 0 can intentionally block another entry while a position is open. Pyramiding limits can also prevent repeated same-direction entries. If an existing trade never closes, inspect the stop, target, or closing condition rather than adding more entry signals. Market orders normally fill on the next available bar after the signal, so the final loaded bar may not yet show a fill.
A quick diagnosis sequence
- Make a copy of the script and verify it uses
strategy()and an order command. - Plot the full entry boolean and then its component booleans on the chart.
- Temporarily remove date and session gates one at a time, recording which change allows a marker.
- If a marker appears without an order, check capital, quantity, position state, and Strategy Tester messages.
- Restore the original rules, then fix the specific mismatch you found. Recheck the trade list and chart markers together.
TradingView's official no-orders guide documents additional causes and platform settings. If the code compiles but trades differently from your intended rules, the issue may require a logic review rather than another parameter tweak.