Download MetaTrader 5
To add comments, please log in or register
Millions of traders download codes from MQL5 library. Share your app with them!
Rasoul Mojtahedzadeh
25326
Rasoul Mojtahedzadeh 2014.12.07 16:13 
In an Expert Advisor code, I would like to know on which bar of a chart the user clicked. From the example and documentation of OnChartEvent() function, a left click of mouse can be captured as a position (x, y). Is there a way to get the bar time/number on which the user left clicked?
Keith Watford
Moderator
7990
Keith Watford 2014.12.07 22:30  

ChartXYToTimePrice

then

iBarShift 

Rasoul Mojtahedzadeh
25326
Rasoul Mojtahedzadeh 2014.12.08 16:51  
GumRai:

ChartXYToTimePrice

then

iBarShift 


Thanks! 
/
To add comments, please log in or register