FiRe Trading: backtest a strategy on history before you risk money

"Buy when the fast moving average crosses the slow one" sounds convincing until you test it. In FiRe Trading you can run a strategy over the whole history of a symbol in a couple of seconds and see how much it would have made, where it lost, and how it compares with simply buying and holding. Free, no sign-in needed.
Why a trader needs it
- Drop bad ideas before they cost money. The tester shows not only the profit but the maximum drawdown — what you would have to sit through on a real account.
- Compare with the market. Above the result there is a line "Strategy: … · bought and held: …". If a strategy loses to simply holding the symbol, it has no point.
- Tune the parameters. Moving average lengths, stops and order size change in the parameters window, and the result is recalculated at once.
How to run it
- Open FiRe Trading and choose a symbol and an interval.
- Press My indicators (the
fxicon on the top bar). - At the bottom of the list, under Strategy examples, pick one of three: a moving average cross with a stop, a channel breakout or an RSI reversal. Or write your own: the line
strategy()makes a script a strategy, andlong,shortandexitplace orders. - Press Apply to chart. The Strategy tester panel opens under the chart.
- Look at three tabs: Summary — the totals, Equity — the account curve and drawdown, Trades — the list, newest first. Clicking a trade takes the chart to its entry.
- The gear in the panel header opens the strategy parameters, the pencil opens its code in the editor.

In the screenshot the example made about 20% since late 2021, while simply holding Apple made more than 100%. That is exactly what the tester is for: to see it before a trade, not after.
The rules of the test
The tester does not peek into the future and counts the way it would have happened in real life:
- a script sees a candle only once it has closed, so an order is filled no earlier than the next candle;
- a market order is filled at the open of the next candle;
- if a stop and a target are both hit within one candle, the stop counts;
- after a price gap an order is filled at the open, and a stop gets the worse price;
- commission and slippage are set in the strategy itself; there is no leverage.
These rules are written right under the result, and the link "The rules of the test" leads to the details. The same place holds a line worth remembering: a test on history does not promise the same result in the future, and it is not investment advice.
Strategies in Pine Script
If you have a strategy written in Pine Script compatible with TradingView, paste it into the editor via New Pine Script indicator — the tester understands strategy.entry, strategy.exit and strategy.close too. Check your strategy on several symbols and intervals: what works on one stock often breaks on another.
How to write strategies in our formula language is explained in the guide to custom indicators and strategies. And you can trade your strategy without money on the paper account — there is a separate blog post about it.