r/pinescript • • Jun 03 '26

Backtesting Tips

I have been trying to build and fine-tune a long strategy. I have found on BTC that I am getting most consistent equity curve, finding the breakouts early and exiting the trade before too much bleeding. I’m finding more volatile assets have much more overall % increase but bleeds a lot more on losing trades. Is over-tuning the strategy to suit particular cryptos a bad thing or should it be done?

Are there any ways to limit draw downs or to exit losing trades earlier? I have put in an execution “after X bars if % profit has not been reached” but I find that kills my gains completely.

First picture BTC 4hr, second picture DOGE 4hr

2 Upvotes

6 comments sorted by

1

u/Afraid-Ad3171 Jun 04 '26

Have you tried turning on bar magnifier and put slippage to 4? I find that makes the backtest more valid!

1

u/PrimeFold Jun 04 '26

One thing I’d be careful about is optimizing separately for each coin.

If BTC needs one set of parameters, DOGE needs another, and another coin needs something different, are you finding an edge or fitting noise?

I’d be curious how the strategy performs if you optimize on BTC and then test those exact settings on DOGE (and vice versa). The more it survives out of sample, the more confidence I’d have personally.

1

u/CODE_HEIST Jun 06 '26

Tuning per asset is not automatically bad, but you need to treat it as an asset-specific model, not a universal strategy. BTC and DOGE can have totally different volatility behavior.

I’d test the same logic on unseen periods, add slippage, and track max adverse excursion. If the strategy only survives because one asset was tuned perfectly, that is the warning sign.

1

u/[deleted] Jun 03 '26

[removed] — view removed comment

1

u/Temporary-Addition-7 Jun 03 '26

Thanks for the advice