CHARTEVENT_MOUSE_MOVE is the way to go.
Alain Verleyen #:
You need to post your code if you want coding help.
You need to post your code if you want coding help.
Someone is stuck here
void OnChartEvent(const int32_t id, const long& lparam, const double& dparam, const string& sparam) { //--- switch(id) { case CHARTEVENT_OBJECT_CLICK: if(sparam == TOGGLE_BUTTON) { toggleButtonState(TOGGLE_BUTTON, isMenuON); } break; case CHARTEVENT_MOUSE_MOVE: if(lparam == 0X02) { Print("Right-click held also!"); } break; } }
Chukwubuikem Okeke #:
Maybe i couldn't find anything in the documentation, thats why am here
And it happened that you replied, which i do appreciate.
So do help out with the best logic or something
Maybe i couldn't find anything in the documentation, thats why am here
And it happened that you replied, which i do appreciate.
So do help out with the best logic or something
MQL5 Book: Mouse and keyboard control / Creating application programs
- www.mql5.com
In this section, we will get acquainted with a group of properties that affect how the chart will capture certain mouse and keyboard manipulations...
MQL5 Book: Mouse events / Creating application programs
- www.mql5.com
We already had the opportunity to make sure that we receive mouse events using the indicator EventAll.mq5 from the section Event-related chart...
Thank you all for your replies .
Am so grateful. It's more than helpful 😊
Am so grateful. It's more than helpful 😊
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Please, what is the correct way to detect a right mouse button click in MQL5?
I am aware that, at the Windows level, the right mouse button is commonly represented by 0x02 . However, I am not sure whether relying on this value (for example by comparing lparam during CHARTEVENT_MOUSE_MOVE ) is reliable, which seems not to work.
I would appreciate experienced opinions on the best practice for handling right-click detection in MQL5. Any clarification or example would be of great use.
Thank you