Data-Forums Data-ForumsAI · data · automation · Gaming
Create an account

New here? Join Data-Forums — ask questions, share builds & trade smarter with us.Sign up freeLog in×

Thread

How do I backtest a Pine Script strategy on TradingView?

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
6 total views  ·  1 guest view

#1
The Strategy Tester is powerful, but garbage-in → garbage-out. Before trusting any result:

1. Turn ON realistic settings – commission, slippage, and order sizing matching your live plan.
2. Watch for lookahead – the classic mistake: using bar t+1 data inside bar t logic. The equity curve looks amazing, then live trading disagrees.
3. Test out-of-sample – optimize on one period, then walk forward on the next. If it only works in-sample, it doesn't work.
4. Check trade count – under ~50 trades the statistics mean almost nothing.

A strategy worth deploying survives all four. Most don't – that's the point of backtesting before risking capital.

How do you split train/test in your own backtests?
Reply

Users browsing this thread:
1 Guest(s)

Forum Jump:
Join AI builders shipping real tools. No hype, no guru courses — just post-mortems, prompts, and people who build.

The community for AI engineers, automation builders, prompt crafters, cybersecurity folks & data practitioners. Talk about what ships — not what trends.

18k+
Posts
1.8k
Threads
112+
Members
Online
© 2026 Data-Forums · Built with by Sir-VIGU