Is it better to just use ObjectCreate(....) instead of first checking with ObjectFind(.....) if I have already created that object and then send the request ObjectCreate(....) I haven't

 

I am trying to optimize my EA, because I would prefer my back tests that run for a few days to be faster. (I am using using visual mode, but it is intentional) 

The thing that is slowing my program are some objects that I am drawing and moving depending on some circumstances.

One thing that could be slowing the program is checking if I have already created the object with ObjectFind() and if not I create it and than set the price and time for the object.

But could it be better to just send the request to create it and after that set the time and price.


And also was wondering if you know, how do all the functions like ObjectCreate(), ObjectFind(), ObjectDelete(), ObjectsDeleteAll(), ObjectSetInteger() compare to each other as for the execution time

 
Why do you not know whether you created the object previously?
 
William Roeder #:
Why do you not know whether you created the object previously?

It is more so, because I create some labels based on the currently opened trades and then if the candle changes I move them to the current and may need to change their price.

So when you change Time Frames or some settings on the EA you basically lose your local data, and that is why I go through all opened trades and either create the label for the first time if the trade is fresh, or just move it to its new position. 

But my main concern was if anyone knows about the execution time on the Object oriented functions