Skip to content
All library documents

Handling MQL5 Dashboard Clicks and Live Account Updates

Article MQL5 articles

Summary

This article explains how to make a MetaTrader 5 trading panel respond to user actions. It uses OnTick to refresh account equity, balance, and server time while the information view is active, and OnChartEvent to detect clicks on chart objects. The panel buttons are intended to open and close trades, manage pending orders, show account details, and dismiss the interface.

The article describes the event handler’s parameters and shows how to identify a clicked control by its object name. It also outlines how button states determine which parts of the panel are active. The examples are implementation guidance rather than a tested trading strategy: the supplied text is truncated during the button logic, and it provides no performance or reliability measurements. Order actions such as closing all positions or pending orders can have broad effects, so the described interface depends on the user selecting the intended control.

Key ideas

  • Use OnTick to refresh account and server-time fields while the information view is enabled.
  • Use OnChartEvent to respond to chart-object clicks and identify the clicked control by name.
  • Buttons can group trade entry, position management, pending-order closure, and account display actions.
  • The article presents interface implementation concepts, not evidence of trading performance.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.