If almost every simple strategy you try ends up profitable after some tuning, be suspicious. The strategies generated by Pine Node Editor don't look into the future: signals use closed bars, entries fill on the next bar's open, commission and slippage are included, and higher-timeframe data always comes from the last completed bar. The usual causes of a too-good backtest are elsewhere.
Adjusting parameters until the result turns green finds settings that fit this stretch of history. They often stop working on new data. This is the most common trap.
Long-only strategies look great while the market rises. Compare with Buy & Hold in the Strategy Tester: if simply holding did better, the strategy didn't add much.
Twenty profitable trades can be luck. Look at the trade count before the profit.
The backtester doesn't know the real price path inside a bar. When take-profit and stop-loss fall in the same bar it assumes an order, and tight trailing stops tend to look better than they will live. TradingView's Bar Magnifier (paid plans) uses lower-timeframe data to reduce this.
A strategy that is in a long most of the time will show a big profit in any rising market: that's the market, not the strategy. Two places in TradingView's Strategy Tester show what simply buying and holding would have done:
Make the sizes match first. Buy & hold puts the whole capital in once, while a strategy from the editor enters with 10% of equity by default, so its profit is naturally about ten times smaller even when it trades well. For a fair comparison set Position size to 100 (% of equity) in the Strategy Settings node, or scale the result in your head.
Then read it plainly: clearly above buy & hold with a similar or smaller drawdown is worth a closer look; about the same or below means the strategy mostly rode the market; below in profit but with a much smaller drawdown can still be useful, as a way to take less risk. A condition that is always true (the editor marks it in amber) turns a strategy into exactly this kind of always-in-the-market baseline.
Connect a Plot node to the Higher Timeframe node's output and look at a lower timeframe. A 4H value on a 15m chart should stay flat for 16 bars and change only when a new 4H bar opens. That's how you can see it uses completed bars only.
More guides: all guides · step-by-step tutorial · what's new