Keep the source, price side, and timestamp attached to every quote you display or store.
Start with the price side
A single number is easy to put on a screen. It is harder to interpret when the reader cannot tell what it represents. Before designing a gold price widget, decide whether it shows bid, ask, a calculated midpoint, or the last recorded trade.
MetaTrader’s MqlTick structure keeps bid, ask, and last as separate fields. It also includes the time of the price update. Those fields describe different aspects of a quote; a field named last should not be silently treated as a synonym for bid. [1]
Make the spread explicit
For a simple display, calculate spread as ask minus bid. In an illustrative quote with a bid of 2,650.40 and an ask of 2,650.60, the spread is 0.20. A calculated midpoint would be 2,650.50. These are example values, not a current market quote.
If you display the midpoint, label it as a midpoint. If you show the spread, keep its unit clear. Avoid mixing a currency difference with a platform’s spread-in-points value: MetaTrader exposes the symbol’s point size and spread properties separately. [2]
Compare like with like
Our recommended comparison checklist is source, symbol, price side, and observation time. When two displays disagree, check those four details before deciding that one feed is wrong. A bid observed earlier is not the same measurement as a later ask.
Keep the provider identifier with stored observations, even if your first version uses only one provider. Adding it later can leave historical records ambiguous. For the same reason, preserve the original timestamp rather than replacing it with the moment your page rendered.
Design the smallest useful quote card
Start with a symbol and source label, a clearly named bid or ask, and a last-update time. Add the other price side and the spread where space allows. Use consistent decimal formatting so values do not jump around as the card updates.
When a request fails, retain the last known value only if its age remains visible. An empty state is clearer than inventing a zero price. This gives users enough context to understand the number without turning a small widget into a trading terminal.
References
Primary sources for the technical details in this article. Implementation suggestions are our own.