ObjectGetInteger with OBJPROP_TYPE seems slow

 

Hello,

Grasping at straws here, but does anyone know a faster way to get an Objects type than good ol' ObjectGetInteger(chart_id, objname, OBJPROP_TYPE) ?

Always seems to be the slowest part of any indicator or script I create.

Thanks in advance :)

 
Try to avoid objects and use array, structs or classes instead.
 
Carl Schreiber #:
Try to avoid objects and use array, structs or classes instead.

Yep, already doing that to the best of my ability, using Canvas for display work, but that also requires a call to the function :(

Thanks.

 
 
Robert Gerald Wood: Always seems to be the slowest part of any indicator or script I create.

You already know the type of any objects you create. No need for the call.

For all other objects, you only need to read the name and type once on the first tick. After that only process object events when they happen.