Get the line Description in the chart drag event

To add comments, please log in or register
samjesse
645
samjesse  

Hi

In mql5;

Is there a way to get the Description property of a Horizontal Line in the drag event? How?

Thanks

void OnChartEvent(const int id,
                  const long &lparam,
                  const double &dparam,
                  const string &sparam)
  {
   if (id==CHARTEVENT_OBJECT_DRAG){
      // here is need to check the Description property.
      if(StringFind(description, "do action 1")){
         action1();
       }
    }
  }
Minions Labs
1201
Minions Labs  
samjesse:

Hi

In mql5;

Is there a way to get the Description property of a Horizontal Line in the drag event? How?

Thanks

Did you tried the sparam on the function?

samjesse
645
samjesse  
Minions Labs:

Did you tried the sparam on the function?

Yes. sparam gives the name not the description.

Oh. thanks for the hint, I get the the object text property then using ObjectGetString. :)
To add comments, please log in or register