if (sparam == CHARTEVENT_CLICK)
to
if (id == CHARTEVENT_CLICK)
.but you probably want to use CHARTEVENT_OBJECT_CLICK to only execute when a specific object has been clicked. Otherwise you will get repeated executuion everytime you click on the chart.
to
.but you probably want to use CHARTEVENT_OBJECT_CLICK to only execute when a specific object has been clicked. Otherwise you will get repeated executuion everytime you click on the chart.
Thank you so much. Actually I want to click on the chart and not on an object. I want any chat on top of the window to be the one to execute the event. But I have read the MQL4 help document and I can see X-cordinate, and Y-cordinate as the parameters to be passed through, including of course the CHARTEVENT_CLICK.
Also, the id alone does not seem to do anything after clicking on the chart. Do I have to add the coordinates, if yes how do I go about it?
Event of a mouse click on the chart | CHARTEVENT_CLICK | the X coordinate | the Y coordinate | — |
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi comrades, I want to write a program to print "Printed Output" after the chat has been clicked. I have the following code which obviously did not work. Please how do I go about it? Thank you in advance.