Questions from Beginners MQL5 MT5 MetaTrader 5 - page 792

 
Alexey Viktorov:

And it's the same.



Oh, man, I got a different kind of a hat:


I don't know how to update it...
 
Aleksey Vyazmikin:

Oh, man, I got a different kind of a hat:


And it's not clear how to update it...

Look at your picture!!! it says

Click and you'll see what you need to see.

 

It turned out to be simpler, I was searching through a pointer which threw me in the"Predefined Variables" section, and the duplicate/extended help is in the "Access to Timesheets and Indicators" subsection!

So only by forcibly scrolling through the help sections was it possible to find the required information.

 
Alexey Viktorov:

Look at your picture!!! it says

Click and you will see what you need to see.


So you try it yourself - I can't see it!

 
Aleksey Vyazmikin:

Try it yourself - I can't see it!

So you have to write to the CD to get the link corrected.

 
Alexey Viktorov:

Then you should write to the CD to have the link corrected.


Wrote in the error thread...

 

Trying to get an OnChartEvent call on a mouse click on an object. Just took the code from help and substituted this ID.

void OnChartEvent(const int CHARTEVENT_OBJECT_CLICK,        // идентификатор события   
                  const long& lparam,                       // параметр события типа long 
                  const double& dparam,                     // параметр события типа double 
                  const string& sparam )                    // параметр события типа string 
   {
   Alert("    lparam = ", lparam);
   Alert("    dparam = ", dparam);
   Alert("    sparam = ", sparam);
   }
Maybe it's my hands, but it doesn't work at all as expected.

1. The function is called not only on mouse click, but whenever I want it to.
2. Every time I click it, it gets called at least twice.
3. If you press the mouse button and do not release it, the function is invoked simply in a continuous stream, hundreds of times.
4. And also it is called not only by clicking on the object, but by clicking anywhere in the window.

Is it so for all or only I am so intelligent?
 
User_mt5:

Trying to get an OnChartEvent call on a mouse click on an object. Just took the code from help and substituted this ID.

Maybe it's my hands, but it doesn't work at all as expected.
...

Is it so for all or am I the only one so smart?

You don't need to substitute anything anywhere.

 
User_mt5:

Trying to get an OnChartEvent call on a mouse click on an object. Just took the code from the help and substituted this ID.

Maybe it's my hands, but it doesn't work as expected.

1. The function is called not only when my beloved mouse clicks, but when it wants to.
2. Every time I click it, it gets called at least twice.
3. If you press the mouse button and do not release it, the function is invoked simply in a continuous stream, hundreds of times.
4. And also it is called not only by clicking on the object, but by clicking anywhere in the window.

Is it so for all or only I am so intelligent?

п. 5. :)


  • You don't need alerts - just do Print().
  • You need to sift the events by:
    • lparam
    • dparam
    • and sparam
 
Artyom Trishkin:

You don't need to set anything up anywhere.

Oh, you don't have to... I didn't know you didn't have to.
Can you tell me how to do it?

Reason: