Where can I get the full list.

 

Where can I get the full list of OBJPROP constants values or how can I check which number represents which constant?

constvals

On mt4 no errors for the below but for mt5 the below returns errors.

ObjectSetInteger(0,"MyObject", 1000,0);
Documentation on MQL5: Python Integration / order_calc_margin
Documentation on MQL5: Python Integration / order_calc_margin
  • www.mql5.com
order_calc_margin - Python Integration - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
Tonny Obare:

Where can I get the full list of OBJPROP constants values or how can I check which number represents which constant?

On mt4 no errors for the below but for mt5 some of the below return errors.


You should use the constants instead of the numbers.

If that's what you are trying to achieve, then you will have to print them out, one by one.


 
Tonny Obare:

Where can I get the full list of OBJPROP constants values or how can I check which number represents which constant?

On mt4 no errors for the below but for mt5 some of the below return errors.


enum ENUM_OBJECT_PROPERTY_DOUBLE (5)
OBJPROP_PRICE [9]
OBJPROP_LEVELVALUE [204]
OBJPROP_SCALE [1006]
OBJPROP_ANGLE [1007]
OBJPROP_DEVIATION [1010]
--------------------------
enum ENUM_OBJECT_PROPERTY_INTEGER (45)
OBJPROP_COLOR [0]
OBJPROP_STYLE [1]
OBJPROP_WIDTH [2]
OBJPROP_BACK [3]
OBJPROP_SELECTED [4]
OBJPROP_TYPE [7]
OBJPROP_TIME [8]
OBJPROP_SELECTABLE [10]
OBJPROP_CREATETIME [11]
OBJPROP_TIMEFRAMES [12]
OBJPROP_LEVELS [200]
OBJPROP_LEVELCOLOR [201]
OBJPROP_LEVELSTYLE [202]
OBJPROP_LEVELWIDTH [203]
OBJPROP_ZORDER [207]
OBJPROP_HIDDEN [208]
OBJPROP_FONTSIZE [1002]
OBJPROP_RAY_LEFT [1003]
OBJPROP_RAY_RIGHT [1004]
OBJPROP_ELLIPSE [1005]
OBJPROP_ARROWCODE [1008]
OBJPROP_ANCHOR [1011]
OBJPROP_XDISTANCE [1012]
OBJPROP_YDISTANCE [1013]
OBJPROP_DIRECTION [1014]
OBJPROP_DEGREE [1015]
OBJPROP_DRAWLINES [1016]
OBJPROP_STATE [1018]
OBJPROP_XSIZE [1019]
OBJPROP_YSIZE [1020]
OBJPROP_PERIOD [1022]
OBJPROP_DATE_SCALE [1023]
OBJPROP_PRICE_SCALE [1024]
OBJPROP_BGCOLOR [1025]
OBJPROP_CORNER [1026]
OBJPROP_CHART_SCALE [1027]
OBJPROP_READONLY [1028]
OBJPROP_BORDER_TYPE [1029]
OBJPROP_CHART_ID [1030]
OBJPROP_FILL [1031]
OBJPROP_RAY [1032]
OBJPROP_XOFFSET [1033]
OBJPROP_YOFFSET [1034]
OBJPROP_BORDER_COLOR [1035]
OBJPROP_ALIGN [1036]
--------------------------
enum ENUM_OBJECT_PROPERTY_STRING (7)
OBJPROP_NAME [5]
OBJPROP_TEXT [6]
OBJPROP_LEVELTEXT [205]
OBJPROP_TOOLTIP [206]
OBJPROP_FONT [1001]
OBJPROP_BMPFILE [1017]
OBJPROP_SYMBOL [1021]

Hope is not for decompilation purposes 

Files:
enumap.txt  88 kb
 
Lorentzos Roussos #:

Hope is not for decompilation purposes 

Thanks.

 

I also noticed the mt5 IDE accepts it as below and doesn't return an error. 

ObjectSetInteger(0,"MyObject",(ENUM_OBJECT_PROPERTY_INTEGER) 1000,0);
 
Tonny Obare #:

I also noticed the mt5 IDE accepts it as below and doesn't return an error. 

interesting observation , thank you

 
Tonny Obare #:

I also noticed the mt5 IDE accepts it as below and doesn't return an error. 

That is called casting. You tell the compiler how to interpret the value. In this case you cast it from an integer to a enumeration.


 
Tonny Obare #:

I also noticed the mt5 IDE accepts it as below and doesn't return an error. 

Though it doesnt seem to work well this way despite compiling without errors.

 
Lorentzos Roussos #:

Hope is not for decompilation purposes 

Also some of these don't match those on mql website e.g OBJPROP_CORNER as in this page https://docs.mql4.com/constants/objectconstants/enum_object_property

Object Properties - Objects Constants - Constants, Enumerations and Structures - MQL4 Reference
Object Properties - Objects Constants - Constants, Enumerations and Structures - MQL4 Reference
  • docs.mql4.com
Object Properties - Objects Constants - Constants, Enumerations and Structures - MQL4 Reference
 
Tonny Obare #:

Also some of these don't match those on mql website e.g OBJPROP_CORNER as in this page https://docs.mql4.com/constants/objectconstants/enum_object_property

In value , yes , these are from mql5 i should have clarified . 

 
Lorentzos Roussos #:

In value , yes , these are from mql5 i should have clarified . 

Okay.