lparam values with CHARTEVENT_CHART_CHANGE

 
Hello,

does anyone know what the lparam values mean after a CHARTEVENT_CHART_CHANGE event?
 
Marbo:
Hello,

does anyone know what the lparam values mean after a CHARTEVENT_CHART_CHANGE event?

Take a look here, its all layed out in the second table.


EDIT: in your case they mean nothing.
 
Dominik Egert #:

Take a look here, its all layed out in the second table.


EDIT: in your case they mean nothing.
I saw this table but I was curious what the values mean because I work with the CHARTEVENT_CHART_CHANGE and I thought they might be useful.
[Deleted]  
Marbo #I saw this table but I was curious what the values mean because I work with the CHARTEVENT_CHART_CHANGE and I thought they might be useful.

It is right there in the table as indicated in the documentation—none of the parameters are defined for that chart event.

Event

Value of the id parameter

Value of the lparam parameter

Value of the dparam parameter

Value of the sparam parameter

Event of change of the chart size or modification of chart properties through the Properties dialog

CHARTEVENT_CHART_CHANGE

Documentation on MQL5: Constants, Enumerations and Structures / Chart Constants / Chart Properties
Documentation on MQL5: Constants, Enumerations and Structures / Chart Constants / Chart Properties
  • www.mql5.com
Identifiers of ENUM_CHART_PROPERTY enumerations are used as parameters of functions for working with charts . The abbreviation of r/o in the ...
 
Fernando Carreiro #:

It is right there in the table as indicated in the documentation—none of the parameters are defined for that chart event.

Event

Value of the id parameter

Value of the lparam parameter

Value of the dparam parameter

Value of the sparam parameter

Event of change of the chart size or modification of chart properties through the Properties dialog

CHARTEVENT_CHART_CHANGE

I totally agree with you both. BUt this little function shows lparam values when CHARTEVENT_CHART_CHANGE is triggered and I was curious what they mean.

void OnChartEvent(const int id,
                  const long &lparam,
                  const double &dparam,
                  const string &sparam)
  {
//---
        if (id!=CHARTEVENT_MOUSE_MOVE) {
                Print(EnumToString((ENUM_CHART_EVENT)id));
                if (lparam>0) Print("lparam ",lparam);
                if (dparam>0) Print("dparam ",dparam);
                if (sparam!="") Print("sparam ",sparam);
        }
}
[Deleted]  
Marbo #I totally agree with you both. BUt this little function shows lparam values when CHARTEVENT_CHART_CHANGE is triggered and I was curious what they mean.

We cannot see your screen, so show us the log output as well.

However, undefined values are as the word states—undefined. The values that those variables contain can be remnants of what was in the memory before.

 
Fernando Carreiro #:

We cannot see your screen, so show us the log output as well.

However, undefined values are as the word states—undefined. The values that those variables contain can be remnants of what was in the memory before.

It shows always the same numbers 1, 16, 17, 34 and rarely 33 and 49. That's all I noticed. Depends on what you are doing with the chart. Scrolling, switching timeframes, change scale etc.

Maybe it's really some random data resulting from internal procedures. Like I said, I was just curious.
 

Hi,

I'm doing some tests,

Seems to be the sum of changes (like power of 2, bits)

Apparently, changes should be :

1 = time scale changes
2 = size chart changes
4 = shift (true false) changes
8 = ? (not appeared)
16 = price scale changes
32 = autoscroll changes
64 = ? (not appeared, if there's more)

If that can help someone

1 ((lparam&1)==1) : time scale/scroll changes, except autoscrolling on new candle
2 ((lparam&2)==2) : resize chart
4 ((lparam&4)==4) : chart mode changes, shift on/off
8 ((lparam&8)==8) : I haven't seen
16 ((lparam&16)==16) : price scale changes
32 ((lparam&32)==32) : autoscroll doing is job
64 ((lparam&64)==64) I haven't seen, don't know if exists

So I think 1 is first visible bar..

 
Interesting thread. Thanks for sharing!
 
Doerk Hilger #:
Interesting thread. Thanks for sharing!

Yes.. But..

It's a little bit not exactly that, needs some more investigation for being exact..


Should be in the documentation ! .. Because it could indeed be interesting

 
Flohti #:

Hi,

I'm doing some tests,

Seems to be the sum of changes (like power of 2, bits)

Apparently, changes should be :

If that can help someone

So I think 1 is first visible bar..

8 ((lparam&8)==8) : One-Click or DoM panel on/off
64 ((lparam&64)==64) : A sub-window splitter was moved.