Camovia Tray™

Blog · Knowledge

How to Get Current Price in MQL4: A Trader's Guide

Camovia Tray Team · 2026-09-15

Every MQL4 developer eventually hits the same wall: you’re deep into coding an Expert Advisor or a custom indicator, and suddenly you realize — you need the current price, and you need it now. It sounds simple. But the moment you start looking, you find three different ways to fetch that price, and they’re all slightly different. Which one is right for your use case? Which one works when you need it most?

The answer depends on what you’re building, and more importantly, how you’ll be using that price data.

The Three Ways to Fetch Current Price in MQL4

Let’s lay out the landscape. If you’ve spent any time in the MQL4 documentation, you’ve probably encountered all of these at some point.

Method 1: Predefined Variables (Bid and Ask)

The simplest approach uses the built-in variables Bid and Ask. These are predefined variables that MetaTrader 4 updates automatically with every tick. You can use them anywhere in your code.

double currentBid = Bid;
double currentAsk = Ask;

Why you’d use it: It’s clean, immediate, and requires zero setup. This is the workhorse of simple scripts and quick calculations.

The catch: These variables only work for the current chart symbol. If your EA needs prices from multiple currency pairs simultaneously, you’re out of luck.

Method 2: MarketInfo() Function

For more flexibility, MarketInfo() lets you specify the symbol you want data for. This is the go-to when you need to monitor multiple instruments.

double PriceAsk = MarketInfo("EURUSD", MODE_ASK);
double PriceBid = MarketInfo("EURUSD", MODE_BID);

Why you’d use it: It unlocks multi-symbol capability. You can poll any symbol available in your Market Watch, making it essential for more sophisticated strategies .

The trade-off: MarketInfo() is slower than using predefined variables because it needs to look up the data each time. For most use cases, this doesn’t matter. But if you’re calling it hundreds of times per second, you’ll notice the overhead.

Method 3: SymbolInfoTick() with MqlTick Structure

The modern way. SymbolInfoTick() fills an MqlTick structure with comprehensive data: Bid, Ask, Last price, volume, and timestamp — all in a single call .

MqlTick last_tick;
if(SymbolInfoTick(Symbol(), last_tick))
{
    Print("Bid = ", last_tick.bid, " Ask = ", last_tick.ask);
}

Why you’d use it: It’s efficient and gives you more context (volume, last deal price) in one go. This is the recommended approach for modern MQL4 development.

The nuance: You still need to specify which symbol you’re querying, so it shares the multi-symbol flexibility of MarketInfo() with better performance.

When Code Becomes Complexity

Here’s where the coding journey intersects with the practical reality of trading. You’ve got your price data — great. But now what? Every time you want to check that price, you need to be at your terminal, watching the chart, or logging into your platform remotely.

Many traders find themselves in a pattern: they code the EA, they test it, and then they realize their workflow still requires them to physically open MT4 to see what’s happening. The EA works, but the daily routine of checking market conditions remains unchanged.

This is the gap that Camovia Tray addresses. It’s not an EA, and it’s not replacing your code — it’s solving a different problem: how to keep tabs on your positions without making MetaTrader 4 your always-on, front-and-center application .

The approach is straightforward: Camovia Tray turns MT4 (and MT5) into a system tray tool. You can hover over the tray icon to see real-time quotes for your selected symbols, and check your open positions — all without opening the MT4 window . It reads your data locally, straight from your terminal, and keeps it on your machine.

For the MQL4 developer who spends hours coding, this is the layer that makes the data accessible outside the EA. You’ve built the logic; Camovia Tray gives you a way to peek at the market during the rest of your day.

Choosing Your Approach

The technical choice is clear: If you need multi-symbol access, use SymbolInfoTick() or MarketInfo(). If you only need the current chart’s price and performance matters, use Bid and Ask.

But the real question isn’t just how to get the price — it’s how you want to use that price once you’ve got it. Are you building automated trading logic? Then embed SymbolInfoTick() in your OnTick() handler. Are you looking for a better way to monitor the market outside your coding sessions? That’s where a tool like Camovia Tray can make the data you’re already fetching available at a glance, without pulling you back into the terminal every time.

Either way, the MQL4 language gives you the building blocks. The rest is about designing a workflow that actually works for you.

MT4/MT5 Tray Assistant

Silent tracking, one-click close - check quotes and manage positions right from the tray.

Download Camovia Tray

Frequently Asked Questions

Is the MT4 bridge EA safe? What do I need to enable?

Yes. The bridge EA (CamoviaBridge) is bundled with the app - it only reads quotes/positions locally and executes close commands; no DLLs, no data uploads. Closing positions requires turning on AutoTrading in the MT4 toolbar.

How much does it cost? Is there a free trial?

Subscription pricing starts at $2.49/month (also $6.99/3 months, $13.49/6 months, $23.99/year), all plans with full features. New users get a 2-day free trial on first activation (once per device and per email), then decide whether to subscribe.

How do I restore the MT5/MT4 window after hiding it?

Choose "Show MT5/MT4" from the system tray menu and the window returns to its previous position. You can also hover the tray to check quotes and manage positions without opening the terminal.

Can it replace MT5/MT4 for trading?

No - Camovia Tray is a local shortcut tool. You can close positions right from the popup; all trading operations (opening, closing, etc.) are submitted by your local MT5/MT4 terminal to your own broker account. The app does not hold your funds or provide investment advice.

Popular Symbols Trading Hours

Open/close times, weekend hours & live market status: