How to Use StrategyForge
Optimize TradingView strategies — stop guessing, start testing.
StrategyForge is a Chrome extension that turns the tedious process of tuning TradingView strategies into an automated, data-driven workflow. Instead of manually tweaking a parameter and watching the backtest, you define a range, and StrategyForge runs every combination for you — then ranks the results by P&L, drawdown and win rate. This tutorial walks you through optimizing a basic strategy from start to finish.
1. Open a TradingView strategy
Start with a simple Pine Script strategy that exposes at least one tunable parameter. A classic example is a Moving Average crossover strategy with a Trend MA Length input — for instance, a 100-bar moving average used to filter trend direction. The exact value of that length (97? 100? 103?) is what we are going to optimize.
Open the strategy on a TradingView chart and add it to the pane so the Strategy Tester tab shows its baseline performance.
2. Open the StrategyForge popup
Open the TradingView charts page in your browser, then click the StrategyForge extension icon to open its popup. Make sure the popup stays visible on screen — the extension needs to interact with the chart and the Strategy Tester panel during the optimization run.
If you are a guest, follow the quick-start prompts: Open Charts, Open Settings, Detect Popup (the extension will confirm the settings popup is visible).
3. Add parameter ranges
In the popup, each detected input from your strategy appears as a Parameter Ranges card. For our example, the card would read Trend MA Length (100 MA) with three fields:
- MIN — the lowest value to test (e.g.
97) - MAX — the highest value to test (e.g.
100) - STEP — the increment between tests (e.g.
1)
With MIN=97, MAX=100, STEP=1, StrategyForge will test 4 values: 97, 98, 99, 100. You can add more parameters using the Add Parameter selector — the Total executions counter updates live so you can see how the grid grows before you commit.
💡Tip: start with a narrow range around the strategy's default value. You can always widen it in a second pass once you see where the optimum lies.
4. Configure options
Two toggles let you fine-tune the run:
- WFA mode — enables Walk-Forward Analysis. The extension stores full trade info for each parameter set so you can validate robustness out-of-sample. It is slower but much more informative.
- Use Entire History — sets the TradingView date range to Entire History, maximizing the data each backtest runs against.
💡Tip: WFA mode is slower but validates that a parameter set is robust, not just lucky on one slice of data.
5. Start the optimization
Hit Start Optimization. StrategyForge will iterate through every combination in your grid, replaying the strategy on TradingView for each one. Progress is shown live in the popup. Keep both StrategyForge and TradingView visible in the same browser window for best speed — background tabs are throttled by Chrome.
💡Tip: keep StrategyForge and TradingView in the same browser window for best speed.
6. Review the results
When the run finishes, switch between the three tabs:
- Results — ranked list of every parameter combination tested, with P&L, drawdown and win rate.
- History — all your past optimization runs, searchable by strategy name.
- WFA — walk-forward breakdowns for each parameter set (available when WFA mode was enabled).
Pick the parameter set that balances strong returns with acceptable drawdown — not necessarily the single highest P&L.
7. Apply the best parameters
Open your strategy's settings on TradingView and enter the optimal values you found (e.g. Trend MA Length = 98). Run one final backtest on the chart to confirm the numbers match what StrategyForge reported — and you are done.
That's it
You now have a repeatable workflow: pick a strategy, define parameter ranges, run the grid, review results, apply the winner. Use it on every tunable input — moving average lengths, RSI periods, stop-loss multiples — and let the data decide.