Did you enable mouse monitoring?
It's in the documentation for the Chart Events types: Documentation on MQL5: Constants, Enumerations and Structures / Chart Constants / Types of Chart Events
ENUM_CHART_EVENT
ID | Description |
---|---|
CHARTEVENT_MOUSE_MOVE | Mouse move, mouse clicks (if CHART_EVENT_MOUSE_MOVE=true is set for the chart) |
Send notifications of mouse move and mouse click events (CHARTEVENT_MOUSE_MOVE) to all mql5 programs on a chart | bool |
Ok here the code for everybody hoe search the solution:
int OnInit() { //--- ChartSetInteger(ChartID(),CHART_EVENT_MOUSE_MOVE,true); //--- succeed return(INIT_SUCCEEDED); }
I am getting now my "moved moved" print and the coordinate where the mouse is, but would it be also possible to get the name of the object on which the mouse hover?
When i change my print statement with adding sparam it just print a zero
Print("moved moved ",sparam);
normally this sparam give me at mouse click the name of the object, is it also possible to get the object name for mouse move?
You don't seem to be paying attention to the documentation: Documentation on MQL5: Constants, Enumerations and Structures / Chart Constants / Types of Chart Events
Event | Value of the id parameter | Value of the lparam parameter | Value of the dparam parameter | Value of the sparam parameter |
---|---|---|---|---|
Mouse events (if CHART_EVENT_MOUSE_MOVE=true is set for the chart) | CHARTEVENT_MOUSE_MOVE | the X coordinate | the Y coordinate | The string value of a bit mask describing the status of mouse buttons |
You don't seem to be paying attention to the documentation: Documentation on MQL5: Constants, Enumerations and Structures / Chart Constants / Types of Chart Events
ok so you give me your example it say " The string value of a bit mask describing the status of mouse buttons " without understanding this, hoe ever have translate this to english and so on, i guess it does not work to get object names, but instead of telling me it does not work you give me a answer like this, do you dont find yourself that this is not cool answer? i ask myself often where the problem is why people here are always pissed of they dont give good code examples they always say look to documentation as if it is not already the first place where everybody look. in all other codeing forum you get like a gentelman a real usefull answer also with some code often and here people always just say look there and there.
Where is the problem if i am the second million hoe have ask this give your code example give a real answer or dont say anything, at the end every answer will be find in google and help also many other people, so instead of always get pissed of when somebody ask somethink just give usefull answer or nothing.
So, let's see If I get this. I have been answering you and giving you the information, calling attention to the documentation which you have ignored. And now you are complaining that I'm been "uncool" for helping you find the information?
Goodbye and good luck!
You stated, and I quote: "When i change my print statement with adding sparam it just print a zero normally this sparam give me at mouse click the name of the object",
And I gave the answer by quoting the documentation: "The string value of a bit mask describing the status of mouse buttons"
How insensitive of me! 🙄 🤦♂️
But don't worry, I will not be answering any of your future questions.
You stated, and I quote: "When i change my print statement with adding sparam it just print a zero normally this sparam give me at mouse click the name of the object",
And I gave the answer by quoting the documentation: "The string value of a bit mask describing the status of mouse buttons"
How insensitive of me! 🙄 🤦♂️
But don't worry, I will not be answering any of your future questions.
if you want tell everybody it is possible or not possible but dont waist anybodys time with such useless answer.
Nobody does need such answers like your when he is searching for a solution, tell the people just its possible or not and give the code or dont give the code but tell them what they need to know and dont play the teacher, if you dont want to give real help forget it just, i bet it is not possible but instead of telling its not possible you give such useless comment.
i myself would say it is not possible to get the object name on mouse move but only with reading the coordinate from the mouse and the coordinate from the objects, that is my answer to anybody hoe search such simular solution.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I wonder why the following code does not make any print, i did think the Mouse Move Event is clear thing, but looks like dont work?
Normaly it should print "moved moved" i like to move it move it... but it does not print anything, why?
Is there not a mouse move event for charts? I want to know when the move move over objetcs or anything at which coordinate it is currently and so on, i did think the Mouse Move event is exactly what i need but i wonder now why it does not work?