Discussing the article: "Ready-made templates for including indicators to Expert Advisors (Part 1): Oscillators" - page 2

 

I played around and got something

But there was also a task to get the name of the cell when clicking on it.

All I get is this.

void OnChartEvent(const int id, const long &lparam, const double &dparam, const string &sparam)
{
  if(id==CHARTEVENT_OBJECT_CLICK) 
    Print(sparam);
}

--

Is there a solution?

 
Vitaly Muzichenko #:

I've been playing around and I've got something

But there was also a task to get the name of the cell when clicking on it.

All I get is this

--

Is there a solution?

I'm afraid there is no simple solution - it's drawn data. So, when you click on the table, you need to track the cursor coordinates and determine which drawn cell it is on.

 
Artyom Trishkin #:

I'm afraid there is no simple solution - this is drawn data. So, when you click on the table, you need to track the cursor coordinates and determine on which drawn cell it is located.

In general, it will be possible to get past it.

 

I drew a parallel graphical object OBJ_RECTANGLE_LABEL with ZORDER = 1, and colour = clrNONE

Works fine, gets the cell name. Also collapses and expands

Thanks!

 
Vitaly Muzichenko #:

In general, it will be possible to get past it.

No