A strategy exposes a tidy 'Stop %' input in its settings, so it looks risk-managed. But the input is never connected to an exit — a subtle bug our engine is specifically built to catch.
//@version=6
strategy("Trend rider", overlay = true)
stopPerc = input.float(2.0, "Stop %")
ema = ta.ema(close, 50)
if ta.crossover(close, ema)
strategy.entry("Long", strategy.long)Intent mismatch: a stop/risk input is declared but never wired into a strategy.exit(stop=...) — the risk control doesn't exist in the executed logic.
Our engine flags an intent mismatch: a stop/risk input is declared but never wired into a strategy.exit(stop=...). The dropdown promises a stop-loss, the executed logic has none, and the backtest quietly runs with no protective stop at all — so its drawdown is not the drawdown you'd actually experience. Either register the input via strategy.exit("x", stop = ...) or remove the dead control so the settings tell the truth.
Code-correctness analysis only — not financial advice, and not a measure of profitability. The code shown is a representative community pattern, not any specific author's script. Trading involves substantial risk of loss.