Home Using MTContext

Using MTContext

By Thanh
6 articles

Checking prices, bars, and account state

The safest way to get comfortable with MTContext is to start with questions that only read your terminal — live prices, your account balance, your open positions. None of these touch a trade, none of them need confirmation, and all of them work on the free tier. This article covers what you can ask for and the tools behind it. Live prices and spreads Ask your AI things like "What's the current price of EURUSD?" or "What's the spread on XAUUSD right now?" Behind the scenes this calls get_tick, which returns the current bid, ask, and spread for a symbol. It's the fastest way to confirm your terminal is connected and streaming live data. Historical bars For chart data, ask "Show me the last 200 H1 bars for EURUSD." That maps to get_bars, which returns OHLCV (open, high, low, close, volume) candles for a symbol and timeframe — anything from M1 up to MN1. This is the raw material an AI uses when you ask it to analyse a chart. What's in your Market Watch "What symbols do I have in Market Watch?" calls get_symbols and lists everything available on your terminal. To get the contract spec for one symbol — lot size, swap rates, digits — ask about a specific instrument and it calls get_symbol_info. Your account and positions You can check the state of your account without opening MetaTrader: - "What's my balance and equity?" → get_account_info (balance, equity, margin, leverage, currency). - "What positions do I have open?" → get_positions, with live profit and loss per position. - "Do I have any pending orders?" → get_orders. - "Show my closed trades from last week." → get_trade_history, with an optional date range. One call for a full picture If you want a symbol's whole picture at once, ask for a snapshot: "Give me a market snapshot of GBPUSD." The get_market_snapshot tool returns the current tick plus a set of indicators across up to four timeframes in a single call — it replaces five to eight separate requests when you're sizing up an instrument. Why start here Everything on this page is read-only — there's no way for these requests to place, modify, or close a trade. It's the ideal place to confirm your setup works and to see how your AI calls MTContext tools before you move on to analysis or trading. Next steps Ready to go further? See Running technical indicators through chat for analysis, and Sizing positions by risk, not lots when you start planning trades. New here? Start with the Quickstart article. Start free at mtcontext.com — the free tier covers everything on this page.

Last updated on Jul 25, 2026

Running technical indicators through chat

You don't need to open a chart and drag indicators onto it. With MTContext, you can ask your AI client to compute any of sixteen standard indicators on any symbol and timeframe, and it reads the values straight from your terminal's live data. This article shows what's available and how to ask for it. What you can ask for Try prompts like "Calculate RSI(14) on GBPUSD H4" or "What's the MACD histogram doing on EURUSD daily?" Your AI calls the get_indicator tool, which returns the raw indicator values from your connected terminal. The full set of supported indicators: - Momentum/oscillators: RSI, Stochastic, CCI, Williams %R, DeMarker, Momentum, MFI - Trend: MACD, SMA, EMA, ADX/DMI, Parabolic SAR, Ichimoku - Volatility: ATR, Bollinger Bands, Standard Deviation Each takes the usual parameters — for example RSI accepts a period (default 14), MACD accepts fast/slow/signal (12/26/9), Bollinger accepts period and deviation. If you don't specify, sensible defaults are used. Across multiple timeframes at once Ask "Give me RSI on EURUSD across M15, H1, and H4" and the AI can request several timeframes in one call, returning results keyed by timeframe. This is how you get a quick multi-timeframe read without three separate questions. The one-call snapshot When you want a broad look at a symbol, ask for a snapshot: "Snapshot XAUUSD." The get_market_snapshot tool returns the current price plus a chosen indicator set (default RSI, ATR, EMA) across up to four timeframes in a single request — it replaces five to eight separate calls. A note on interpretation MTContext returns raw, unlabelled numbers — it doesn't attach "buy" or "sell" verdicts. The values are deterministic; your AI client is what interprets them into support/resistance, momentum, or trend language. That separation is deliberate: you get the real numbers, and the reasoning stays visible in the conversation. What you need Indicators are available on the free tier — no trading capability required. You just need a connected terminal streaming live data. Next steps Pair this with Checking prices, bars, and account state for the underlying data, and Sizing positions by risk, not lots when you turn analysis into a trade plan. Try it free at mtcontext.com — technical analysis is included on every tier.

Last updated on Jul 25, 2026

Sizing positions by risk, not lots

"How many lots?" is the wrong first question. The right one is "how much am I willing to lose on this trade?" MTContext lets you ask in those terms — "What lot size keeps me at 1% risk with a 30-pip stop on EURUSD?" — and it does the math against your real account. How risk-based sizing works Ask your AI to size a trade by risk, and it calls calculate_lot_size with three inputs: the symbol, your risk percentage, and your stop-loss distance in pips. It then uses your live account equity and the symbol's contract specifications from your connected terminal to return: - the recommended lot size, - the risk amount in your account currency, and - the pip value for that symbol. Because it reads live equity, the answer is always current — a lot size at 1% risk shrinks automatically as your account draws down and grows as it recovers. Example "I want to risk 1% on GBPJPY with a 40-pip stop. What size?" The tool computes the lots that put exactly 1% of your current equity at risk over that 40-pip distance, and tells you the dollar (or euro, etc.) figure that represents. If the computed size falls below your broker's minimum lot, you'll get a clear LOT_TOO_SMALL result rather than a rounded-up trade that quietly breaks your risk rule. Seeing your risk across the whole book Sizing one trade is half the picture. On the Team tier and above, you can also ask "Give me a risk summary" — the get_risk_summary tool returns aggregate currency exposure, margin utilisation, and correlated pairs, so you can catch the case where three "separate" trades are really one big bet on the dollar. (Currency-exposure figures assume FX symbols; indices, crypto, and stocks won't be accurate there.) What you need calculate_lot_size is available on the free tier — no trading capability required, since it only computes and returns a number. The portfolio-level get_risk_summary and correlation tools require the Team tier. Next steps Once you know your size, see Placing trades safely with dry_run to turn it into an order, and Setting up equity protection guardrails to cap your total downside. Start free at mtcontext.com — risk-based sizing is included on every tier.

Last updated on Jul 22, 2026

Placing trades safely with dry_run

Letting an AI place trades on a real account is a reasonable thing to be cautious about. MTContext is built around that caution: by default, a trade request doesn't execute — it shows you exactly what would happen and waits for your explicit confirmation. This article explains the safety model so you know precisely what's happening before anything touches your account. The default is a preview, not an order Every trade-affecting request runs as a dry run unless you explicitly say otherwise. A dry run tells your AI client the full details of the order — symbol, direction, volume, price, stop loss, take profit — and validates it, but does not send it to your broker. Nothing executes until a request is made with dry_run: false deliberately. In practice, that means when you ask your AI to "buy 0.1 lots of EURUSD," what comes back is a description of the trade and a check that it's valid — not a filled order. You review it, and only then confirm. What gets checked before anything executes Even when you do confirm a real trade, MTContext validates it first and fails safe if something's off: - Lot size is checked against your broker's minimum, maximum, and step. - Margin is checked against what's available in your account. - Broker rules — symbol availability, trading hours, and restrictions — still apply exactly as your broker enforces them. MTContext can't override them. If a check fails, the order is rejected rather than sent. Other guardrails you control - Equity protection — you can set a rule that closes positions if your account equity drops below a level you choose. See Setting up equity protection guardrails. - Read-only by default on the free tier — the free plan exposes market and account data only, so there's no way to place a live trade at all until you're on a plan that includes trading. - Every command is deduplicated — each carries a unique ID, so a repeated or retried request can't accidentally fire the same order twice. What MTContext does not do It doesn't trade on its own. MTContext is the bridge; your AI client does the reasoning, and you approve the actions. There's no background strategy placing trades while you're away unless you've explicitly set one up through your AI client and confirmed live execution. A sensible way to start Try read-only requests first (prices, account balance, open positions) — those never touch your account. When you move to trades, keep them as dry runs until you're comfortable with what the AI proposes, then confirm real execution one order at a time. Next steps See What MTContext can and can't do for the full boundary of what's possible, and Understanding the dry_run safety model for a deeper look. Ready to place your first real order? Do it from a connected client after reviewing the dry run. Start free at mtcontext.com — the free tier is read-only, so it's a safe place to explore.

Last updated on Jul 22, 2026

Setting up equity protection guardrails

A stop loss protects one trade. An equity guard protects your whole account. MTContext lets you set a server-side circuit breaker that watches your equity and steps in if you're having a bad day — "Set an equity guard that closes everything if I'm down 3% today." What the equity guard does Ask your AI to set a guard and it calls set_equity_guard. You choose: - max_daily_loss_percent — how far below the day's starting equity you're willing to fall. - max_total_drawdown_percent (optional) — a floor below your initial equity, independent of the daily reset. - breach_action — what happens when the limit is hit: - close_all — close every open position, then block new live trades until the next daily reset. - block_new — stop new trades but leave open positions alone. - notify — just record an alert, taking no action. - reset_timezone (optional) — the timezone for the daily reset boundary, e.g. Europe/Prague. Defaults to UTC. It runs server-side, not in your chat This is the important part: the guard is enforced on MTContext's servers, not inside your AI client. It keeps evaluating on a roughly 30-second loop while your terminal is connected, whether or not your AI client is open. If your terminal happens to be disconnected at the moment a breach would occur, the new-trade block still applies, and a close_all executes as soon as the terminal reconnects. Checking and removing it - "What's my equity guard status?" → get_equity_guard_status shows the config, whether it's armed or breached, your day-start anchor, current equity, and the exact equity level that triggers it. - "Remove my equity guard." → remove_equity_guard. If the guard is currently breached, removing it requires an explicit confirmation, so you can't silently switch off an active safety rail by accident. There's one guard per license — setting a new one replaces the old. A guardrail, not a substitute for stops The equity guard is best-effort protection layered above your broker's own stop-out — it is not a replacement for putting stop losses on your trades. Think of it as the last line, not the only line. What you need The equity guard requires the trade capability (Pro tier and above), since it acts on your positions. Next steps See Understanding the dry_run safety model for how individual trades stay safe, and What MTContext can and can't do for the full boundary of control. See plans at mtcontext.com — equity protection is included from the Pro tier up.

Last updated on Jul 22, 2026

AI coaching and the trade journal

The trades you regret are rarely the ones you thought through. MTContext gives you a place to write down why you're taking a trade at the moment you take it, then lets your AI help you review those decisions later — turning a pile of closed trades into something you can actually learn from. Writing a journal note At order time, tell your AI something like "Log this: bought EURUSD on the H4 breakout retest, trend-continuation setup, tagged breakout and london-session." That calls write_trade_note, which stores your rationale, an optional setup label, tags, and an optional link to the position or order ticket. Entries are append-only and immutable — you can't quietly rewrite history. If you need to correct one, you write a new note that amends the original, so the trail stays honest. Reviewing later When you want to reflect, ask "Show my journal entries tagged breakout" or "What did I write about ticket 123456?" That runs query_journal, which returns entries newest-first and lets you filter by ticket, tag, setup, date range, or a free-text search. For entries linked to closed trades, the realized profit or loss comes back alongside your note (when your terminal is connected) — so you can see which setups actually made money. Over time this is what lets you ask the useful question: "Across all my 'breakout' trades, how did they do?" Deeper coaching on a specific trade On the Team tier and above, you can go further and ask "Explain this trade" about any open or closed position. The explain_trade tool describes the conditions that existed at entry, the risk/reward ratio, the stop-to-ATR ratio, and whether the trade lines up with common strategies. It's a structured second opinion on a decision you already made. What you need The journal — write_trade_note and query_journal — is available on the free tier, which stores up to 100 entries. The explain_trade coaching tool requires the Team tier. Next steps Pair the journal with Sizing positions by risk, not lots and Placing trades safely with dry_run so every trade is sized, logged, and confirmed deliberately. Start free at mtcontext.com — the trade journal is included on every tier.

Last updated on Jul 22, 2026