Can EA get user input from chart?

 

I would like to ask can EA get the user input from chart? For example, when user draw a square on the chart, the EA will know the position of the square and knows the first bar time and the last bar time.


Thanks

 
fxea729 :

I would like to ask can EA get the user input from chart? For example, when user draw a square on the chart, the EA will know the position of the square and knows the first bar time and the last bar time.


Thanks

In OnChartEvent you can track events

Creating a graphical object (if CHART_EVENT_OBJECT_CREATE=true for a chart)

CHARTEVENT_OBJECT_CREATE

Name of a created graphical object

Changing object properties via the properties dialog

CHARTEVENT_OBJECT_CHANGE

Name of a changed graphical object

- after that, using the ChartGet functions, get all the data about the graphic object.

Documentation on MQL5: Constants, Enumerations and Structures / Chart Constants / Chart Properties
Documentation on MQL5: Constants, Enumerations and Structures / Chart Constants / Chart Properties
  • www.mql5.com
Chart Properties - Chart Constants - Constants, Enumerations and Structures - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
Thanks, I will try that