Examples
ModernUI ships three runnable Expert Advisor demos in MQL5/Experts/ModernUI/Examples/Demos/.
Use them to see how the library is meant to be used in real MT5 code: MuiRoot lifecycle, control IDs, the event bus, fast wrappers, and larger panel compositions.
Demos
| Order | Example | Source file | Use it for |
|---|---|---|---|
| 1 | Showcase trade panel | TradePanel_Showcase.mq5 |
Compact trade-style panel: event-bus routing, drawer, dialog, status bar |
| 2 | Trading dashboard showcase | TradingDashboard_Showcase.mq5 |
Tabs, KPI cards, charts, table cell events, accordion, settings drawer |
| 3 | ModernUI showcase demo | ModernUI_Showcase_Demo.mq5 |
Full control catalog across scroll tabs |
Safety note for trade-style demos
Trade-style demos are UI-only. They do not place, modify, or close real orders unless you add your own trading logic.
Check file comments and user action methods before adapting code into a live EA.
How to run a demo
- Install ModernUI into
MQL5/Include/ModernUI/. - Open the
.mq5file fromExperts/ModernUI/Examples/Demos/in MetaEditor. - Compile it.
- Attach the compiled Expert Advisor to a chart.
- Watch the Experts tab for logs if the demo uses logging.
Controls reference while reading demos
Each demo page lists controls used in source and links to the matching Controls reference entries (events, setters, factory helpers).
Next step
Start with Showcase trade panel, then Quick Start. Keep Recommended EA Structure open for lifecycle patterns.