Backtest Any Strategy with a Signal CSV
Signal Backtest lets you test any trading strategy by uploading a CSV of your entry and exit signals, connecting a trade to them, and running a backtest - even strategies you can't build with indicators inside AlgoTest.
Every strategy is two parts: a signal (when to enter and exit) and a trade (what to buy or sell when the signal fires). With Signal Backtest you bring the signal as a CSV and build the trade on AlgoTest.
When to use this​
Use whichever route fits your strategy. Both need a 6-Month Signal Plan.
| Route | Best for |
|---|---|
| Signals AI | Indicator strategies you can describe in plain English (RSI, EMA, Supertrend and so on), built and backtested entirely on AlgoTest - see Signals AI. |
| Signal Backtest (CSV) | Custom or complex logic, a TradingView Pine Script strategy, or any idea whose signals you already have as a list of dates and times. |
Signal Backtest is part of the 6-Month Signal Plan. Your 25 free weekly backtests apply here too; extra backtests use credits.
What you need​
A single CSV file with three columns - a trade number, the signal type, and the date and time the signal fires.
| Column | What it holds | Values |
|---|---|---|
| Trade Number | The sequence number of the signal | 1, 2, 3, … |
| Type | The kind of signal | Entry Long, Entry Short, Exit Long, Exit Short |
| Date & Time | When the signal fires | e.g. 2024-01-01 09:20 |
If your file mixes long and short signals, you can filter to one side after upload.
Build and backtest your strategy​
-
Open Signal Backtest from the top navigation on AlgoTest.
-
Download the sample CSV to see the exact format your file must follow.
-
Build your signal CSV in the same format. You can create it any way you like:
- AI agent
- TradingView
- Manual (Excel)
Ask an AI agent (such as Claude) to generate the CSV. Attach the sample file so it matches the format, and describe your entry and exit logic - for example, "enter long on the first trading day of every month at 9:20 and exit on the last trading day." The agent can also handle market holidays for you.
Open your strategy in the TradingView Strategy Tester, then export its list of trades as a CSV. The exported long/short entries and exits map directly to the four signal types.
Fill the three columns yourself in Excel or any spreadsheet - one row per signal - and save as CSV. This is slower but works for any custom idea.
-
Upload your CSV on the Signal Backtest page. A preview of your signals appears so you can confirm the file read correctly.
-
If your file has both long and short signals, filter to the side you want to test.
-
Connect a trade. This is what AlgoTest places each time a signal fires - a call buy, a put sell, a future, an iron condor, or any leg combination. Build it in the Leg Builder and add your risk management (stop loss, target, re-entry).
noteThe entry and exit time fields on the trade are ignored here - your CSV already defines when each trade enters and exits.
-
Run the backtest. AlgoTest places your connected trade on every signal in the CSV and shows the result: profit and loss, maximum drawdown, win rate, and the number of trades.
-
Optimize without changing your signals. Filter by DTE, adjust stop loss and target, change the traded strike, and add slippage, taxes and brokerage to make the result realistic. Re-run until you're happy.
Backtest and live results can differ. Always add realistic slippage, and avoid tuning to very tight stop losses (for example 10%) that look great in a backtest but rarely fill at the same price in the live market.