FinGeR:
identify Mouse(press or release) on chart objects
Is it possible with MQL5?
void OnChartEvent(const int id, const long &lparam, const double &dparam, const string &sparam) { switch(id) { case CHARTEVENT_CLICK: Print(__FUNCTION__,"; CHARTEVENT_CLICK");break; case CHARTEVENT_OBJECT_CLICK: Print(__FUNCTION__,"; CHARTEVENT_OBJECT_CLICK");break; } }
Documentation on MQL5: Standard Constants, Enumerations and Structures / Chart Constants / Types of Chart Events
- www.mql5.com
Standard Constants, Enumerations and Structures / Chart Constants / Types of Chart Events - Documentation on MQL5
Sorry, only press:
void OnInit() { ChartSetInteger(0,CHART_EVENT_MOUSE_MOVE,true); } void OnChartEvent(const int id, const long &lparam, const double &dparam, const string &sparam) { switch(id) { case CHARTEVENT_MOUSE_MOVE: Print(__FUNCTION__,"; CHARTEVENT_MOUSE_MOVE; sparam= ",sparam);break; } } //+------------------------------------------------------------------+
sparam=1 - pressing the left key
sparam=2 - pressing the right key
Thanks.
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
identify Mouse(press or release) on chart objects
Is it possible with MQL5?
example: identify left mouse click (only press) on object trendline.