> For the complete documentation index, see [llms.txt](https://academy.hyblockcapital.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://academy.hyblockcapital.com/trading-and-backtesting/getting-started/trading-backtests-and-signal-statistics.md).

# Build and run your first strategy

Hyblock Trading lets you turn indicator conditions into a strategy, test it on historical data and study how the condition behaved before you consider live execution.

{% embed url="<https://www.youtube.com/watch?v=ErwiOI3Ek2c>" %}

## 1. Choose your market

In Strategy Setup, pick the Ticker, the Timeframe and the Backtest & Indicator Range Looking (how much history to use). The video uses BTC on Hyperliquid, 15 Minutes and 6 Months.

<figure><img src="https://1530390593-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MQYgDcppxxDvjwMKRcY%2Fuploads%2FJWoILz9f8dg0tdWbGKia%2Ftrading-01b-market-6-months.jpg?alt=media" alt="Strategy Setup panel with BTC Hyperliquid ticker, 15 Minutes timeframe and 6 Months selected for Backtest and Indicator Range Looking"><figcaption><p>Strategy Setup with the tutorial example: BTC on Hyperliquid, 15 Minutes and 6 Months of history.</p></figcaption></figure>

## 2. Add an indicator

Open Metric Builder, search for the metric (for example Volume), select the exchange and data type (for example Hyperliquid and Total), then add it to your chart.

<figure><img src="https://1530390593-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MQYgDcppxxDvjwMKRcY%2Fuploads%2FhYsgAVdoFiApVXBefjSi%2Ftrading-02b-metric-builder-hyperliquid-total.jpg?alt=media" alt="Metric Builder with Volume selected, Exchange set to Hyperliquid USDS-M Perp and Data Type set to Total, next to the Add to chart button"><figcaption><p>Metric Builder with Volume, Exchange Hyperliquid and Data Type Total, ready to add to the chart.</p></figcaption></figure>

## 3. Define your condition

Under Ranges, choose a comparison such as Greater than and enter a value. The video uses Volume greater than 400,000 as a demonstration only, not a recommended signal.

With more than one condition, Logic decides how they combine:

* AND: every condition must match
* OR: any condition can match

## 4. Set direction, order type and risk

Choose LONG or SHORT and a Trading Order Type such as Market Order, then review Risk %, Stop Loss % and Take Profit %. The video uses 5% for each as demonstration inputs.

## 5. Check cost assumptions

Set Entry Fee % and Exit Fee % to reflect what you expect to pay. With fees at 0, results won't represent realistic trading costs. The Slippage % field is labeled for live trading, so don't assume it is included in a backtest.

<figure><img src="https://1530390593-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MQYgDcppxxDvjwMKRcY%2Fuploads%2F5a0Y8PkCZbHkrx7Z6QTO%2Ftrading-03-condition-risk-costs.jpg?alt=media" alt="Strategy Setup panel showing the Volume greater than 400000 range, LONG, Market Order, 5 percent risk settings and zero backtest fees"><figcaption><p>Example setup from the tutorial: Volume greater than 400000, LONG, Market Order, 5% risk, stop loss and take profit, fees at 0. Demonstration inputs only.</p></figcaption></figure>

## 6. Run Backtest

Click Run Backtest to run a historical simulation. This does not start a live strategy.

## 7. Read the results

Performance Metrics show Portfolio Value, Cumulative PnL, Max Drawdown and Total Trades, plus risk, trade outcome and trade quality ratios. Look beyond the headline return: how many trades produced it, and how far the portfolio fell along the way.

<figure><img src="https://1530390593-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MQYgDcppxxDvjwMKRcY%2Fuploads%2Fw8qDf7gAhqXAtkv397wY%2Ftrading-04-backtest-results.jpg?alt=media" alt="Backtest results with price chart and Performance Metrics showing a negative cumulative PnL"><figcaption><p>Results for the example run: Portfolio Value $8,994.59, Cumulative PnL -10.05%, 23 trades, Max Drawdown -29.20%. This example lost money, which is why the trade count and drawdown matter.</p></figcaption></figure>

Open the Trade History Table to inspect each entry, exit and outcome. A small number of trades is not enough to establish a reliable strategy.

<figure><img src="https://1530390593-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MQYgDcppxxDvjwMKRcY%2Fuploads%2FyPkB5QZbiPxJlPWfC6L0%2Ftrading-05-trade-history.jpg?alt=media" alt="Trade History Table with entry and exit times, prices and realized PnL for individual trades"><figcaption><p>Trade History Table from the example run, listing each entry, exit and realized PnL.</p></figcaption></figure>

## 8. Explore Signal Statistics

Switch to Signal Statistics to compare outcomes after your condition (Hypothesis) against a Benchmark across future horizons such as 4 hours, 1 day, 3 days and 7 days. Tables show mean, median, count and standard deviation; distributions show the full spread.

Keep three settings separate:

* Chart timeframe (for example 15 minutes)
* Historical lookback (for example 6 months)
* Outcome horizon in the statistics (for example 4 hours)

A small difference between Hypothesis and Benchmark does not, by itself, establish an edge. Signal observations are also not the same as closed strategy trades.

<figure><img src="https://1530390593-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MQYgDcppxxDvjwMKRcY%2Fuploads%2FJwo52ROFEvriNwQ6DgIK%2Ftrading-06-signal-statistics.jpg?alt=media" alt="Signal Statistics results table and hypothesis distributions"><figcaption><p>Signal Statistics: Hypothesis vs Benchmark tables across 4 hour, 1 day, 3 day and 7 day horizons, with distributions below.</p></figcaption></figure>

## 9. Iterate

Change one input at a time, rerun, and compare results with consistent assumptions.

{% hint style="warning" %}
Backtests and Signal Statistics are historical. They don't guarantee future performance and are not trading advice.
{% endhint %}
