Exposure Net Currency Panel
- Göstergeler
-
Keiki Ishii
Independent MQL5 developer from Japan.
I build tools for MetaTrader 5 traders: risk managers, indicators and Expert Advisors.
How I work:
- Every product is tested in the Strategy Tester and on demo accounts (hedging and netting) before release. - Sürüm: 1.0
- Etkinleştirmeler: 5
Exposure Net is a display-only panel that folds your open positions (and optional pending orders) into net directional exposure by currency, metal, index, and crypto unit. It has no trade signals and never places orders.
Running several EAs or manual positions at the same time often hides concentration. Three different gold EAs buying XAUUSD alongside a long EURUSD trade all stack into one large short USD exposure. Exposure Net adds up the sign and quantity of every position so you can see the real net bias in one table.
What the panel shows
-
Net exposure by currency and asset: folds FX pairs into base and quote currencies, spot metals (XAU, XAG, XPT, XPD) into troy ounces plus their quote currency leg, crypto CFDs into coin units plus optional quote currency leg, and equity indices or other CFDs into contract units in their own directional bucket.
-
Account currency equivalents: converts both Net and Gross exposure into your account currency (USD, JPY, EUR, etc.) and displays Eq x ( |Net| / Equity ).
-
Hedging and netting support: when long and short positions on a hedging account cancel out, the row shows HEDGE (net 0) while keeping the full Gross amount visible. You can hide flat rows if you prefer.
-
Optional pending orders: include Limit, Stop, and Stop Limit orders in the folded totals with one input.
-
Magic number breakdown: an optional lower table groups open trades by magic number (including 0 (Manual) ), showing count, gross notional, and top net legs. Toggle it anytime with the Magic button on the panel, or filter to specific magic numbers.
-
Concentration thresholds and optional alerts: highlight rows in amber (Warning) or red (Alert) when |Net| exceeds your chosen Equity multiple, account currency amount, or share of total net exposure. Optional popup and mobile push alerts trigger once per threshold crossing with a per-bucket cooldown.
Built for real broker specifications
-
Reads each symbol's actual contract size ( SYMBOL_TRADE_CONTRACT_SIZE ), handling standard, mini, micro, cent, metal, index, and crypto CFD units without hardcoding lot sizes.
-
Indices (such as US100, US500, GER40, JP225) stay in their own directional index bucket instead of being misclassified as FX currency legs.
-
When a symbol reports zero tick value, conversion falls back automatically to OrderCalcProfit and then Market Watch cross rates.
-
Symbols with quotes older than 10 minutes or zero spread are marked with * and ranked below live quotes.
-
If the indicator adds any unquoted position symbol to Market Watch for pricing, it removes only the symbols it added when detached.
-
Batched scanning ( InpItemsPerPass ) keeps the chart responsive even on accounts with many open positions and pending orders.
Empty panel when flat
-
When you have zero open positions (and zero pending orders if included), the panel stays cleanly empty. No sample trades or fictional numbers are displayed.
What it does not do
-
No correlation estimates, beta weights, or synthetic hedge calculations. It folds exact position sign and quantity only.
-
No trade signals, no arrows, and no automated trading. It does not open, close, or modify orders.
-
Displaying concentration is an inventory view; it does not predict market direction or improve trading results by itself.
Inputs (main)
-
Scope: include pending orders, fold quote leg for metals / crypto, hide flat hedged rows, magic number filter
-
Thresholds and alerts: threshold mode (Equity multiple, account currency, % share, or Off), warning and alert levels, enable alerts, cooldown seconds, popup / push
-
Table: initial sort ( |Net| , Gross , Name ), rows per page, show magic breakdown, max magic rows, update interval, items per pass, footer note
-
Panel: corner, X/Y offset, font size, background, text, Long / Short / Warning / Alert colors
Notes
-
Works on any account currency, hedging or netting account, and any tradable symbol on your MT5 terminal.
-
In the Strategy Tester with no open positions, the indicator displays the empty panel as expected.
-
No DLL. No web requests.
