Download MetaTrader 5

I have found Bug, When moving the trend line, no values ​​are displayed in the comment.

To add comments, please log in or register
Alexander
249
Alexander  
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
void OnInit() 
{ 
ChartSetInteger(0,CHART_EVENT_MOUSE_MOVE,0,true); 
}


//+------------------------------------------------------------------+
//| ChartEvent function                                              |
//+------------------------------------------------------------------+
void OnChartEvent(const int id,
                  const long &lparam,
                  const double &dparam,
                  const string &)
  {
       
     if(id==CHARTEVENT_MOUSE_MOVE)
     {
     Comment(ObjectGetDouble(0,"Trendline",OBJPROP_PRICE,0));
     }
 }


When moving the trend line, value = 0 are displayed in the comment.



Simon Gniadkowski
Moderator
18058
Simon Gniadkowski  
FinGeR:


When moving the trend line, value = 0 are displayed in the comment.

As far as I understand it from mql5, the ChartEvent() is when you click the mouse . . . not when you are constantly moving it.
Alain Verleyen
Moderator
29868
Alain Verleyen  
RaptorUK:
As far as I understand it from mql5, the ChartEvent() is when you click the mouse . . . not when you are constantly moving it.

OnChartEvent() is an event handler for all sorts of chart events : https://docs.mql4.com/basis/function/events#onchartevent

Each time he moves to mouse a chart event is generated.

Alain Verleyen
Moderator
29868
Alain Verleyen  
FinGeR:


When moving the trend line, value = 0 are displayed in the comment.


Can you please report that to ServiceDesk. Thank you.
Keith Watford
Moderator
8293
Keith Watford  

When you click and hold down the mouse button to move a trendline, the trendline's value is set to 0. It is only when you release the mouse button that the new value will be set.

So while you are moving the trendline the value will be 0

qjol
3245
qjol  
GumRai:

When you click and hold down the mouse button to move a trendline, the trendline's value is set to 0. It is only when you release the mouse button that the new value will be set.

So while you are moving the trendline the value will be 0


as you can c, FinGer attached a pic. from MT5 that working just fine
Keith Watford
Moderator
8293
Keith Watford  
qjol:

as you can c, FinGer attached a pic. from MT5 that working just fine


Maybe, but this is the MT4 forum.

When I posted

When you click and hold down the mouse button to move a trendline, the trendline's value is set to 0. It is only when you release the mouse button that the new value will be set.

So while you are moving the trendline the value will be 0

I was making an observation. Whether or not that is how it is supposed to work, I don't know.

Alexander
249
Alexander  

I explained it badly, I'm sorry.

ServiceDesk has solved the problem. (fixed)

Thanks all.

To add comments, please log in or register