Vizion-Trading-EA/ChartLabels.mqh
35 lines
989 B
MQL5
#ifndef CHART_LABELS_MQH
#define CHART_LABELS_MQH
//+------------------------------------------------------------------+
//| ChartLabels.mqh |
//| The status panel in AILabels.mqh is the single source of truth |
//| for on-chart state. The old top-left status line and the old |
//| bottom-left session/news labels have been folded into it. |
//+------------------------------------------------------------------+
#include "AILabels.mqh"
// Retained only so a label left behind by an older build gets cleaned up.
string STATUS_LABEL = "VZ_STATUS";
void UpdateLabels()
{
// One-shot: clear a status label stranded by a previous version.
static bool legacy_cleared = false;
if(!legacy_cleared)
{
ObjectDelete(0, STATUS_LABEL);
legacy_cleared = true;
}
UpdateAILabel();
}
void CleanupLabels()
{
ObjectDelete(0, STATUS_LABEL);
CleanupAILabels();
CleanupSessionLabel();
}
#endif