请教,编程参考中if(id==broadcastEventID)是如何触发的,最后 id为什么等于5000了,谢谢!

 

string buttonID="Button";
string labelID="Info";
int broadcastEventID=5000; 

if (id>CHARTEVENT_CUSTOM)

     {
      if(id==broadcastEventID)
        {
         Print("Got broadcast message from a chart with id = "+lparam);
        }
      else
        {
         //--- We read a text message in the event
         string info=sparam;
         Print("Handle the user event with the ID = ",id);
         //--- Display a message in a label
         ObjectSetString(0,labelID,OBJPROP_TEXT,sparam);
         ChartRedraw();// Forced redraw all chart objects
        }
     }

 

 链接:https://docs.mql4.com/eventfunctions/eventchartcustom 

原因: