OnChartEvent don't work

 

Hi guys, I need a big help. In my indicator I create some ChartEventCustom, but when OnChartEvent is On, it don't work corretly.

can you tell me what I do wrong?

here there is my code:

<Deleted>

Tank you too for all help.

 

Please edit your posts and paste the code using the code button (Alt+S)

Your code was unreadable, so I deleted it.

When OnChartEvent is On I write this line: <:p><:p>

OnChartEvent  id <:p><:p>

9 <:p><:p>

 lparam <:p><:p>

0 <:p><:p>

 dparam <:p><:p>

0 <:p><:p>

 Sparam <:p><:p>

custom <:p><:p>

1000 <:p><:p>

I don't know why.

 
  1. Delete that last post, it' just as broken.

    Please edit your (original) post and use the CODE button (Alt-S)! (For large amounts of code, attach it.)
              General rules and best pratices of the Forum. - General - MQL5 programming forum
              Messages Editor

  2. 80613536: , it don't work corretly.

    "Doesn't work" is meaningless — just like saying the car doesn't work. Doesn't start, won't go in gear, no electrical, missing the key, flat tires — meaningless.

    Do you really expect an answer? There are no mind readers here and our crystal balls are cracked. How can we know what it's doing and what you want it to do.

 
Hi Keith, Hi William, I am sorry for my misundestand, I don't mean that "it doesn't work corretly", but that  "I don't use it corretly". Now I attach my file. Tasks you too.
Files:
 

Please use this template and try again.

//+------------------------------------------------------------------+
//| ChartEvent function                                              |
//+------------------------------------------------------------------+
void OnChartEvent(const int id,         // Event identifier  
                  const long& lparam,   // Event parameter of long type
                  const double& dparam, // Event parameter of double type
                  const string& sparam) // Event parameter of string type
  {
//--- the left mouse button has been pressed on the chart
   if(id==CHARTEVENT_CLICK)
     {
      Print("The coordinates of the mouse click on the chart are: x = ",lparam,"  y = ",dparam);
     }
//--- the mouse has been clicked on the graphic object
   if(id==CHARTEVENT_OBJECT_CLICK)
     {
      Print("The mouse has been clicked on the object with name '"+sparam+"'");
     }
//--- the key has been pressed
   if(id==CHARTEVENT_KEYDOWN)
     {
      Print("The key with code ",int(lparam)," has been pressed");
     }
//--- the object has been deleted
   if(id==CHARTEVENT_OBJECT_DELETE)
     {
      Print("The object with name ",sparam," has been deleted");
     }
//--- the object has been created
   if(id==CHARTEVENT_OBJECT_CREATE)
     {
      Print("The object with name ",sparam," has been created");
     }
//--- the object has been moved or its anchor point coordinates has been changed
   if(id==CHARTEVENT_OBJECT_DRAG)
     {
      Print("The anchor point coordinates of the object with name ",sparam," has been changed");
     }
//--- the text in the Edit of object has been changed
   if(id==CHARTEVENT_OBJECT_ENDEDIT)
     {
      Print("The text in the Edit field of the object with name ",sparam," has been changed");
     }
  }
//+------------------------------------------------------------------+

Example:

//--- the mouse has been clicked on the graphic object
   if(id==CHARTEVENT_OBJECT_CLICK)
     {
      if(sparam == "MyButtonName")
        {
         Print("The mouse has been clicked on the object with name '"+sparam+"'");
        }
     }
Reason: