Get the line Description in the chart drag event

 

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();
       }
    }
  }
 
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?

 
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. :)
Reason: