Getting Started

Your First Backtest

A hands-on walkthrough: pick an asset, select a timeframe, add entry/exit conditions, and run your first backtest.

Your First Backtest

This is a hands-on walkthrough. In about five minutes you will pick an asset, build a simple two-rule strategy, run it against years of real market data, and see exactly how it would have performed -- without writing any code or risking any money. If you are not sure what a backtest is or why traders run them, read What is a Backtest? first and come back.

What You Will Build

You will build one of the oldest trend-following ideas in trading: a moving average crossover, often called a golden cross. The rules:

Buy (entry)
When the average closing price of the last 20 candles rises above the average of the last 50 candles. Recent prices climbing faster than the longer trend is the classic sign that an uptrend may be starting.
Sell (exit)
When the 20-candle average falls back below the 50-candle average -- the same signal in reverse.

The averages are simple moving averages (SMA). The exact numbers 20 and 50 are not magic -- they are just a common starting point, and later you can test other values yourself.

A teaching example, not a recommendation
This strategy was chosen because it is easy to understand and produces trades on most assets -- not because it makes money. Whether it does is exactly the question your backtest will answer.

Step 1: Open an Asset

In the sidebar, under Backtesting, choose Stock Backtest (this walkthrough uses a stock so every plan can follow along on daily candles -- Forex Backtest and Crypto Backtest work the same way). Type a company name or ticker into the search box, or pick one of the popular tickers listed below it. Any well-known, long-listed stock works well for a first run.

The asset page opens with a price chart at the top -- a preview of the data you are about to test on -- followed by two cards: Configuration and Strategy Builder. Those two cards are where everything happens. (A Tutorial button above them replays the guided tour if you ever want an in-app refresher.)

Step 2: Check the Configuration

The Configuration card holds the settings that frame the test. For this walkthrough the defaults are almost all correct, so this step is mostly a check:

Position
Leave it on Long. The strategy buys hoping price rises. Long vs Short Strategies explains the other tab.
Timeframe
Select 1 Day if it is not already selected -- each candle in the test will represent one trading day. Your timeframe choice shapes everything about a backtest, but daily candles are the right place to start.
Leverage
Leave it at 1x -- no borrowed money, gains and losses at their natural size.
Fill
Leave it on Next open. When a rule triggers on a candle, the trade executes at the next candle's opening price -- the way a live trader could actually act on a signal. How the Simulation Works covers the details.
Dates
Click the start-date button and pick a date several years back, and leave the end date recent. A moving-average crossover trades infrequently, so give it room -- more history means more trades to judge it by. The Candles counter next to the dates shows how many candles the range contains.

Skip the Advanced Settings row at the bottom of the card for now -- Understanding the Interface walks through every control there.

Step 3: Build the Entry Rule

Move down to the Strategy Builder card. It has two columns: Entry Logic (when to open a trade) and Exit Logic (when to close it). Each column starts with one empty rule that reads like an unfinished sentence beginning with IF. You fill in the blanks:

1. Pick the first indicator
In the Entry Logic column, click Indicator... A dialog titled Select Technical Indicator opens. Search for "SMA" and choose SMA (Simple Moving Average). A small number input appears in the sentence, pre-filled with the default period of 20 -- exactly what we want. (Hovering an input like this shows the valid range for that parameter.)
2. Pick the comparison
Click comparison... and choose Crossed Over from Below (Golden Cross). This fires only on the candle where the first value moves from below the second value to above it -- not on every candle where it happens to be higher.
3. Pick what to compare against
Next to compare to, keep the Indicator tab selected and pick SMA (Simple Moving Average) again. Its period input also defaults to 20 -- click it and change it to 50.

Read the finished sentence back: IF SMA (20) crossed over from below SMA (50). In plain language: the moment the short average overtakes the long average, buy.

Step 4: Build the Exit Rule

Now the Exit Logic column, which works identically. Build the mirror image of the entry: SMA with period 20, Crossed Under from Above (Dead Cross), compared to SMA with period 50. The moment the short average falls back under the long average, the position closes.

Every trade this strategy takes is now fully defined by rules -- no gut feeling, no "it looked toppy". That is the whole point of entry and exit conditions: rules can be tested; feelings cannot.

The other buttons in the Exit column
Below your exit rule you will see buttons like Add Stop Loss and Add Take Profit. These add safety-net exits that close a trade at a fixed loss or gain regardless of what the indicators say. Skip them for the first run -- Stop-Loss, Take-Profit & Trailing Stops covers them when you are ready.

Step 5: Run It

Click the large Run Backtest button at the bottom of the Strategy Builder. A Processing Backtest... overlay appears while the engine replays your rules over every candle in your date range -- typically a few seconds. When it finishes, the page scrolls down to your results.

The first thing you will see is the Overview tab: a headline Total Return with a comparison against simply buying and holding the asset, followed by risk and trade statistics, with charts and a trade-by-trade log in the tabs beside it. There is a lot there, and all of it is explained in Reading Your Results -- but three numbers deserve your attention right away:

Total Return vs buy & hold
Did following your rules actually beat doing nothing? The headline banner shows both. A strategy can be profitable and still lose to the do-nothing benchmark.
Max Drawdown
The worst peak-to-valley loss along the way -- max drawdown is the number that tells you what holding this strategy would have felt like at its worst.
Trades
How many trades the result is built on. A conclusion drawn from 4 trades is a coin-flip sample; one drawn from 40 starts to mean something.

Step 6: Change One Thing

A single backtest is a single data point. The real learning starts when you re-run with one deliberate change and watch what moves. Try any of these -- each run takes seconds:

Different periods
Swap 20/50 for 10/30 (faster, more trades) or 50/200 (the classic long-term golden cross). Notice how sensitive the results are to two numbers you picked arbitrarily.
A different asset
Run the identical rules on another stock. A strategy that only works on one asset may have been lucky rather than good.
A longer date range
Stretch the start date back further. Does the strategy survive market conditions it was not designed around?

If you find yourself repeatedly nudging the SMA periods hunting for the best pair, know that this has a failure mode -- curve fitting -- and a systematic tool built for exactly this job: parameter optimization tests every combination in one run and shows you whether good settings cluster together or sit on a lucky island.

If your first result looks amazing
Before drawing conclusions, remember what a backtest with default settings leaves out: trading costs. Real trading pays spreads, commissions, and slippage on every round trip, and this walkthrough ran with all of them at zero. Add realistic costs in Advanced Settings and re-run before believing any result -- and read Limitations & Pitfalls before trusting one.

Saving Your Work

The Save Strategy button below the Strategy Builder stores your rules under a name so you can reload them later -- on this asset or any other -- with Load Strategy. Saving requires an account (and strategy slots depend on your plan). The heart button next to the asset name adds the asset itself to your favorites for quick access from the sidebar.

Where to Go Next

Understanding the Interface -- every control on the backtest page, including the Advanced Settings this walkthrough skipped.

Reading Your Results -- a guided tour of every tab, chart, and statistic in the results.

Entry & Exit Conditions -- crossovers, thresholds, AND/OR logic, and multi-condition strategies.

How the Simulation Works -- what the engine actually does with your rules, candle by candle.