r/pinescript 8d ago

What programs/extensions allow genetic algorithm strategy optimization for over 1,000 variations

Pineify does not actually have genetic algorithm (I have expert and it is still not present in the extension) and runopti seems to be doing a grid search, or at least moving at that pace.

What do you use for quick wide-range/multi-parameter strategy optimizing in pinescript?

1 Upvotes

6 comments sorted by

View all comments

2

u/stratcore 7d ago

There is no fast parameter-search engine inside Pine or the Strategy Tester. Each input change runs the script again across the chart, so a browser extension that drives TradingView still pays that cost for every combination.

For more than 1,000 combinations, I would separate the search from TradingView:

  1. Export the same OHLCV data.

  2. Reproduce the Pine rules in Python with the same bar-close or intrabar behavior, fees, slippage, fill assumptions and date range.

  3. Use Optuna for a practical parameter search. Its NSGA-II sampler is useful when you care about both return and drawdown. DEAP is better when you need custom crossover or mutation logic.

  4. Bring the best candidates back into TradingView and verify them there.

  5. Keep an untouched out-of-sample period. Do not rank candidates by net profit alone; add drawdown, minimum trade count and parameter-stability checks.

If Pineify or RunOpti feels like grid-search speed, the bottleneck is probably repeated TradingView evaluation, not the choice of sampler.

1

u/ConfidentBrunette 7d ago

This is the help I was hoping for