Trade History and Custom Analysis
Filter trades by dates, instruments, Magic Numbers, and comments; configure History and reset saved settings.
Use Custom Analysis to investigate a specific part of an account's trading history. You can combine a closing period, instruments, Magic Numbers, and trade comments, then inspect the resulting figures and trades.
Open the Account Dashboard and click Custom Analysis beside the chart. The Analysis Settings window has four tabs: General, Instruments, Magic, and Comments. Set the conditions you need, then click Apply to apply them together.
Screenshots in this article use demonstration trades. The worked example selects eight closed trades from a history of 96.
What the filters affect
| Dashboard element | Effect of Custom Analysis |
|---|---|
| Closed trades in History | Selected by close time, instrument, Magic Number, and comment. |
| Historical charts, statistics, and Analytics | Recalculated from the selected history. Account for these conditions when comparing results. |
| Open positions and Floating P&L | Instrument, Magic, and comment selections restrict the positions included. A historical period does not turn them into a snapshot of positions on that date. |
| Open Orders | Shows the account's current pending orders. Custom Analysis does not narrow this list. |
| Current Balance and Equity | Remain whole-account figures from the latest data. |
| Deposits and withdrawals | Retained for capital calculations. A balance operation is not a trade made by the selected EA. |
Filtering, sorting, and columns
- Filtering changes which trades participate in the analysis.
- Sorting changes the order of rows in a table.
- Columns changes which fields the table displays.
Showing the Magic column does not isolate an EA's trades. To do that, select its value on the Magic tab and click Apply.
All beside the chart removes the period restriction. It does not mean “reset instruments, Magic Numbers, and comments.” Use Reset All for a complete reset.
General: dates and starting balance

General: date boundaries, the save-dates option, and Starting Balance Override.
Set a period
- Open General and enter Date From and Date To for the range you need.
- Enable Save dates for future sessions if you want to return to these dates in later sessions.
- Click Apply, then check History and the dependent figures.
Closed history is selected using the trade's close time. Date boundaries currently use UTC. When checking a trade near midnight, account for the time zone used to display its timestamps.
Starting Balance Override
Enter a positive amount in Balance ($) to set the starting capital used for the analysis. Leave the field blank to return to automatic detection from the capital history.
This is useful, for example, when reviewing strategy selections against the same starting capital. Changing the base affects relative figures and the calculated curve. Use the same settings when comparing results.
The amount does not deposit money into the trading account, change its current balance in MetaTrader, or change trade sizes.
The starting balance is saved separately from the save-dates checkbox. Choosing 30D changes the current period but does not clear the Magic selection or Starting Balance Override.
Instruments and Magic: isolate a strategy
Instruments
Click Deselect All, then enable the instruments you need. You can select several: within a tab, a trade can match any selected value. Select All removes the restriction for that category.

Instruments: selecting symbols to include in the analysis.
Magic
Select one or several Magic Numbers in the same way. To exclude a particular EA from the overall result, start with Select All and disable its value. Click Apply when the selection is ready.

Magic: strategy identifiers, including the separate value 0.
A Magic Number is an identifier received from the terminal. Different EAs can use the same number, so check your configuration. 0 is common on manual trades but does not, by itself, prove that a trade was opened manually.
For a saved strategy grouping across several accounts, use an EA group in Expert Advisors. Custom Analysis is for investigating the object currently open.
Comments and combined conditions
On Comments, select the text labels attached to trades. The list contains nonempty comments already present in the received history or open positions.

Comments: selecting existing labels such as Trend_A, Trend_B, and Breakout_B.
- Selection uses the exact value in the list, rather than a partial-word search. Different text, capitalization, or spaces may represent a different value.
- You can enable several comments at once.
- Empty comments do not appear as a separate selectable label. To include uncommented trades again, remove the category restriction with Select All or Reset All.
- A trade comment is a trading-data field. It is separate from a personal note in AI Trade Journal or a Changelog entry.
How conditions combine
| Selection | Matching rule |
|---|---|
| Within Instruments | EURUSD or GBPUSD. |
| Within Magic | 1001 or 2002. |
| Across tabs | A selected instrument and a selected Magic Number and a selected comment and the required closing period. |
If no trades remain after Apply, the conditions may not overlap. Remove the Comments restriction first, then Magic or Instruments, and check which step brings the history back.
Example: EURUSD + Magic 1001 + Trend_A
The goal is to see only EURUSD trades with Magic 1001 and the comment Trend_A. In the demonstration history, this combination leaves 8 closed trades out of 96.
- Open Custom Analysis. To inspect the full history, leave General without dates or a custom starting balance.
- In Instruments, click Deselect All and enable EURUSD.
- In Magic, click Deselect All and enable 1001.
- In Comments, click Deselect All and enable Trend_A.
- Click Apply. In History, enable the Magic and Comment columns and check the rows.

Combined filtering: the selected strategy's trades and selection total.
Verify the result
- The closed trades show EURUSD with the required Magic and Comment values.
- Trade count and historical figures reflect the selection.
- Current open positions include only matching instruments, Magic Numbers, and comments.
- Deposits can remain in History. They support capital calculations and do not increase the selected EA's closed-trade count. In this example, nine table records contain eight closed trades and one deposit.
- Balance and Equity at the top still describe the whole account.
Next, add an exact period in General and apply the settings again. This helps separate the effect of strategy selection from the effect of dates.
Columns and History sorting
Open History and click Columns. Enable the fields you need, such as Magic No., Comment, Open date, Close date, Swap, and Commission. Open trades and History have separate column settings.

Columns: enabling fields in the closed-history table.
Change the row order
Click a header with a sorting arrow. Click again to reverse the direction. Available History sorts include symbol, action, volume, open or close time, Profit, and Duration. Availability depends on which columns are enabled.
In the current account dashboard, Magic No. and Comment are display fields without click-to-sort headers. Use the Magic and Comments tabs in Custom Analysis to isolate the corresponding trades.
Clicking a symbol inside a row opens the trade chart. Clicking its header with a sorting arrow sorts the rows.
| Action | Does it change the analysis selection? |
|---|---|
| Hide Comment through Columns | No. It only hides the column. |
| Sort History by Profit | No. It changes row order. |
| Select Trend_A and click Apply | Yes. It changes which trades are included. |
Column settings are saved in the current browser for that account and table. Another browser or device may show a different set of columns.
Open a trade on the candlestick chart
In History or Open trades, click the symbol in the required row. A separate chart window opens. For a closed trade, you can compare entry, exit, and available SL/TP levels. The markers shown depend on the trade data.

The trade chart with candle-interval and viewing-range controls.
- Apply the history selection you need, then choose a trade.
- Open its chart by clicking the symbol and locate the trade's markers.
- Change the candle interval or viewing range to examine the relevant section.
- Compare times, direction, and prices with the History row. Close the window to return to your selection.
Changing the candle interval in this window does not change the Custom Analysis period or recalculate the entire account dashboard.
If the chart does not load
The quote source may not have suitable candles for a broker-specific symbol. Check the instrument's availability and how it maps to a standard symbol name. The candle source may differ from your broker; also use terminal data when verifying exact execution prices.
Saved settings and reset
| Setting | What is saved |
|---|---|
| Starting Balance Override | Saved for your view of this account after Apply. |
| Date From / Date To | Saved for future sessions when the corresponding checkbox is enabled and you click Apply. |
| Instruments / Magic / Comments | Apply within the currently loaded account dashboard. Saving dates does not save this strategy selection. |
| Columns | Saved in the current browser separately for the account and table. |
To discard changes you have not applied, close the settings window using its close button.
Reset All immediately clears the filters, starting balance override, and saved dates, returning the period to All. You do not need to click Apply after resetting.
If dates were saved earlier, choosing 30D clears them in the current view, but the saved dates may return after a reload. To remove them permanently, clear the save-dates checkbox and click Apply, or use Reset All.
Five checks before comparing results
- The correct account is open and you know its data source: EA or statement.
- You have checked the last update, currency, and workspace context.
- Period, Instruments, Magic, Comments, and starting balance match.
- You have distinguished table sorting from changing the analysis selection.
- The required observations exist for historical Equity and MAE/MFE.
Return to Account Dashboard or Overview Dashboard.