> For the complete documentation index, see [llms.txt](https://help.hydravision.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.hydravision.ai/products/asset-profiler/running-a-profile.md).

# Running a Profile

Asset Profiler runs in the MetaTrader 5 Strategy Tester, not on a live chart. It watches every tick of the period you give it, then writes a JSON file when the run finishes.

{% hint style="warning" %}
**The common misreading.** Attaching it to a live chart and treating what it writes as a profile. The export happens when the Profiler stops, and on a live chart that is when you remove it from the chart or close the terminal. A file is written then, but its spread figures only cover the ticks seen while it was attached, often minutes or hours. Use the Strategy Tester, so the spread sample covers the whole window you choose.
{% endhint %}

### What you need first

**The symbol on the account you intend to trade.** Spread and swap are read from the live symbol, so a demo account with different conditions gives you a different answer.

**Real tick history downloaded** for the period you want. In the tester, set the modelling mode to **Every tick based on real ticks**. If the tick value can't be calibrated the export still runs, but the header will read `tick_value_approximate` instead of `real_ticks` and every cost figure is less trustworthy.

**M1 history.** Some assets retrace so fast that a fifteen-minute measurement can't tell one step from the next. When that happens the Profiler re-runs the timing at one-minute resolution automatically. It needs more than 1,000 M1 bars to do it, and prints a note in the journal if they aren't there.

### Running it

1. Open the Strategy Tester and select **AssetProfiler**.
2. Choose your symbol and set the date range.
3. Set modelling to **Every tick based on real ticks**.
4. Set your inputs (below), and in particular your real commission.
5. Run. The JSON is written when the run completes.

### The inputs that matter

Most defaults are correct. These are the ones to look at.

In the MetaTrader inputs tab most inputs are shown by their description rather than a short name, so the tables below use the text you'll see there. A few inputs have no description, and MetaTrader shows their short name (for example `InpAccountType`).

#### Costs

| Input (as MetaTrader shows it)          | Default    | Notes                                                                                                                                                     |
| --------------------------------------- | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Commission per lot, positive number** | `6.0`      | **Enter your real commission, as a positive number.** The run refuses to start if it's negative.                                                          |
| **How the broker quotes it**            | Round turn | *Round turn* = charged once for in and out. *Per side* = charged on entry and again on exit. Getting this wrong doubles or halves your commission figure. |

Commission matters more than it looks. A default that doesn't match your account puts every cost figure in the report wrong in the same direction.

#### Sessions

| Input                             | Default |
| --------------------------------- | ------- |
| `InpAsianStart` / `InpAsianEnd`   | 0 / 8   |
| `InpLondonStart` / `InpLondonEnd` | 8 / 16  |
| `InpNYStart` / `InpNYEnd`         | 13 / 21 |

These are **broker server hours**, not your local time. If your broker's server sits at a different offset from the default assumption, the session panel will attribute spread to the wrong sessions. Worth checking once for your broker and then leaving alone.

#### Model assumptions

| Input (as MetaTrader shows it)                                        | Default | What it controls                                                                                                             |
| --------------------------------------------------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------- |
| **Cost tolerance (kappa) - max share of target that costs may take**  | `0.35`  | How much of the profit target costs are allowed to take. A lower figure is a stricter view.                                  |
| **Profit target as a fraction of step**                               | `0.35`  | The share of the step a PCL close aims to earn.                                                                              |
| **Frontier-to-VWAP distance, in steps, for a 2-position pair**        | `0.40`  | Part of the retrace calculation. Rarely changed.                                                                             |
| **Ladder fill factor. Depth 1=1.000 2=0.667 3=0.556 5=0.467 7=0.429** | `0.667` | How deep the modelled grid is assumed to run. The description lists the value for each depth; the default is depth 2.        |
| **Minimum retrace samples for a curve point to count**                | `100`   | How many measured retraces a row of the sweep needs before it counts as reliable. Lower it and thin rows stop being flagged. |

The run refuses to start if the cost tolerance or the profit target is zero or negative.

Changing the tolerance or the target changes the verdict, the band floor and every cost share. Two profiles run with different settings are not comparable. The settings appear in the badge at the top of the report for exactly this reason.

#### Band preset

| Input (as MetaTrader shows it)                             | Default |
| ---------------------------------------------------------- | ------- |
| **Band preset - AUTO picks FX or non-FX by contract size** | Auto    |

Auto treats a symbol as FX when Hydra Vision treats it as a currency pair, or when it carries a 100,000 contract. FX symbols get **0.30 / 0.40 / 0.55 × H4 ATR**; metals, indices and everything else get **1.63 / 2.71 / 3.80 × H4 ATR**. Both are calibrated against live results.

{% hint style="info" %}
**Profiler versions before v1.23 went by contract size only.** A currency pair that a broker lists with a smaller contract (some brokers list minor pairs at 1,000) was profiled as non-FX: its figures were shown in price rather than pips, and it got the much wider non-FX band. The input's description in MetaTrader still mentions contract size, but v1.23 uses the rule above. See [When to re-profile](/products/asset-profiler/when-to-re-profile.md).
{% endhint %}

A custom band uses the three inputs **Custom band low x H4 ATR (0 = use the preset)**, **Custom band mid x H4 ATR (0 = use the preset)** and **Custom band high x H4 ATR (0 = use the preset)**. When all three are filled in, they replace the preset. If the preset is set to Custom but any of the three is left at zero, the custom band is not used and a warning goes to the journal. A profile made with a custom band is marked as not calibrated in the export.

#### Sampling and reporting

| Input                                                   | Default | What it controls                                                                                                                                                   |
| ------------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `InpATRPeriod`                                          | 14      | The period of the ATR and ADX readings on every timeframe.                                                                                                         |
| `InpM15BarsMax`                                         | 25,000  | How many M15 bars the volatility and retrace timing use (see the table under Two windows).                                                                         |
| `InpD1BarsMax`                                          | 60      | How many D1 bars the daily figures use.                                                                                                                            |
| **M1 bars for the latency fallback when M15 saturates** | 120,000 | The most M1 bars used when the timing is re-run at one-minute resolution.                                                                                          |
| `InpLogSessionBreak`                                    | true    | Whether spread is also recorded per session, for the session panel.                                                                                                |
| **Secondary unit shown beside ticks**                   | Auto    | Auto shows pips on FX and price distance on everything else. It can be forced to pips or to price. It changes only how figures are labelled, not what is measured. |

#### Labelling

`InpAccountType` (default `Standard`) is free text. It's copied into the report header as-is and nothing verifies it. If you run a Raw account and leave it saying Standard, the report will say Standard. Set it correctly or the profile misidentifies itself later.

### Two windows, not one

Worth understanding, because it affects how you choose your date range.

**Spread comes from the tester run.** Every tick in your date range is sampled, tick-weighted, and that's what produces the spread figures, the session breakdown and the `period_from` / `period_to` in the header.

**Volatility and timing use fixed bar counts ending at the run end**, regardless of how long your range is:

| Measurement             | Bars          | Roughly    | Set by                                |
| ----------------------- | ------------- | ---------- | ------------------------------------- |
| M15 ATR, retrace timing | 25,000        | \~1 year   | `InpM15BarsMax`                       |
| H4 ATR, H4 trend        | 480           | \~80 days  | `InpD1BarsMax` × 8                    |
| D1 ATR, D1 trend, gaps  | 60            | \~3 months | `InpD1BarsMax`                        |
| M1 fallback timing      | up to 120,000 | \~3 months | **M1 bars for the latency fallback…** |

So a two-week tester run still reports a year of M15 volatility, but only two weeks of spread. That's usually not what you want.

**Practical guidance:** run at least three months so the spread sample is representative, and remember that the step range is anchored to the H4 ATR over the last \~80 days of your range, not over the whole of it. If you're profiling a period you know was unusual, end the run at the point you care about rather than starting it there.

### Where the file goes

The export lands in the terminal's **common** data folder, not the per-terminal one, in a subfolder named after the account it ran on (the same layout as the EA's backtest exports):

```
<MetaQuotes>\Terminal\Common\Files\hydra_asset_profiles\<account number>\
```

Profiles made before v1.23 are directly in `hydra_asset_profiles\`.

In MetaTrader, **File → Open Data Folder** opens the per-terminal folder — you need the `Common` folder one level up from `Terminal\<instance id>`.

The filename is the profile's identity:

```
EURUSD_2022.07.05_2022.10.28_DooTechnology-Live.json
```

Symbol, first tick date, last tick date, broker server. The portal treats two profiles as the same when the symbol, the broker server and the **first** date match. Loading one over the other replaces it in the portal rather than stacking it, even if the last dates differ.

### Loading it

Open the Asset Profiler portal and either pick a profile from your repository or drag the JSON onto the drop zone. You can load several at once; a strip of symbol chips appears, each with a coloured dot for its verdict. See [Comparing Assets](/products/asset-profiler/comparing-assets.md).

### If nothing was written

Check the journal. The Profiler refuses to start in two cases (a negative commission, or a cost tolerance or profit target of zero or less), skips the export in two more, and warns in several:

* **"no usable tick value"** — the terminal could not value a tick for this symbol. Every cost figure would be meaningless, so nothing is written. Usually means the symbol isn't fully initialised; open it in Market Watch and re-run.
* **"Could not open file"** — the file itself couldn't be created, so nothing is written. Usually follows the next message.
* **"Failed to create hydra\_asset\_profiles"** — the folder couldn't be created, usually a permissions problem on the common folder.
* **"only N M1 bars available"** — the timing fallback is unavailable. The report still writes; download M1 history if the step curve reports as unresolved.

### What to do with this

* Run in the Strategy Tester on real ticks, on the account you'll actually trade.
* Enter your real commission and check the basis. It's the input most likely to be wrong.
* Three months minimum, and set `InpAccountType` honestly so the profile identifies itself.
