Download MetaTrader 5
To add comments, please log in or register
Carry on your private correspondence in your profile. It is secure!
Alexandra
230
Alexandra 2014.02.23 21:36 
//+------------------------------------------------------------------+
//| 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
17963
Simon Gniadkowski 2014.02.23 21:41  
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
28522
Alain Verleyen 2014.02.23 22:52  
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
28522
Alain Verleyen 2014.02.23 22:56  
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
7887
Keith Watford 2014.02.24 00:00  

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
3243
qjol 2014.02.24 01:45  
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
7887
Keith Watford 2014.02.24 05:06  
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.

Alexandra
230
Alexandra 2014.02.24 16:47  

I explained it badly, I'm sorry.

ServiceDesk has solved the problem. (fixed)

Thanks all.

/
To add comments, please log in or register