Creating a window or table with list of active EAs and ther properties

 

Hello


in the MQL5 environment, I'd like to create a window (or anything equivalent) with a list/table listing all active EA (rows) and their properties (columns) such as P/L, position, entry price. 

The list will update continuously.

Since I plan to run many EA, and I want to compare MQL5 strategies with same strategies running on other platforms, I need an instrument to help me keeping in track of the overall situation at a glance.


Which would be the easiest and most straightforward way to do so? Any advice or suggestion will be appreciated.

 
Hello friend,
To create a continuously updating window or table in MQL5 for monitoring active EAs with properties like P/L, position, and entry price, consider these straightforward approaches:
  1. Custom Panel with CAppDialog:
    • Use the CAppDialog class from the Standard Library to create a dialog window.
    • Add a table (CListView or custom CEdit controls) to display EA data (rows for EAs, columns for properties).
    • In OnTimer() or OnTick(), iterate through open positions (PositionsTotal() and PositionGet*) to fetch P/L, entry price, etc., and update the table.
    • Example: Include <Controls\Dialog.mqh> and extend CAppDialog to build the UI. Check the MQL5 CodeBase for sample dialog-based dashboards.
  2. Graphical Object Table:
    • Create a table using ObjectCreate() with OBJ_LABEL for text-based cells on the chart.
    • Update cell values in OnTimer() by looping through positions and calculating P/L, etc.
    • Simpler but less polished than a dialog. See ChartObjectsTxtControls.mqh for inspiration.
  3. External Output with File/Print:
    • For simplicity, log EA data to a CSV file (FileWrite()) or the Experts tab (Print()).
    • Use an external tool (e.g., Python script) to read the CSV and display a live table.
    • Less integrated but easier for cross-platform comparison.
Recommendation: Start with CAppDialog for a native, user-friendly solution. Use OnTimer() for updates every second. Check the MQL5 article "Creating a Multi-Symbol Volatility Dashboard" for a practical example of building a similar interface.
Feel free to share your progress or ask for code snippets!