Problem – Object Search Time
I refer to my previous post titled Feature Request - Access Global Variables By Index.
There is also a similar search time problem with object functions which use an object name to locate an object on a chart.
EA creates, modifies and deletes a significant number of chart objects which are used for visual display in the one-week testing period.
Searching for a chart object as the number of objects increase requires incrementally more computing search time to locate an object. Testing has shown that as the number of objects increases the time required to locate an object increases exponentially.
Feature Request – Access Objects by Index
If index values are used to locate objects then the time required to access those objects will be substantially reduced. The time saving for accessing objects by index should be greater than the time saving for accessing global variables by index if there are more objects than global variables.
The above can be implemented, as for the global variable functions, by adding an index implementation to the object functions.
See testing results below.
Chart objects in MT can't be accessed by index only by name. That's why the post was written.
- We can't see the method used to build this graph, so it's without any value.
- Objects can be accessed by index if you manage the index your self.
- Is it an academic question or is there any practical usage for more than 10,000 objects ?
- We can't see the method used to build this graph, so it's without any value.
- Objects can be accessed by index if you manage the index your self.
- Is it an academic question or is there any practical usage for more than 10,000 objects ?
You still need to get those objects onto the screen and the time taken by MT to do that is where the problem is because of the way it accesses objects (by name rather than by index).
It is practical. Some of the strategies create tens of thousands of objects per chart.
Are tens of thousands of objects really relevent to a current trading decision or are most of them historical ? If they are you should delete the old ones to improve access times on the relevent ones.
EDIT: Note that objects are also used in testing and this is where the access speed of objects becomes a particular problem.
I tried to reproduce the behaviour, because I became a bit confused about mixing the access (i.e. search) and "creation" (with the chart comment) . Fortunately I did not need to know a "method", because I can write a few lines myself.
The results are pretty interesting. The most interesting is the final time for the built-in ObjectDeleteAll():
12:45:16 Script speedTest EURUSD,M10: loaded successfully 12:45:18 speedTest EURUSD,M10 inputs: count=10000; 12:45:18 speedTest EURUSD,M10: initialized 12:45:18 speedTest EURUSD,M10: create time = 78 12:45:18 speedTest EURUSD,M10: search time = 16 12:45:18 speedTest EURUSD,M10: delete time = 47 12:45:18 speedTest EURUSD,M10: uninit reason 0 12:45:18 Script speedTest EURUSD,M10: removed 12:45:30 Script speedTest EURUSD,M10: loaded successfully 12:45:37 speedTest EURUSD,M10 inputs: count=100000; 12:45:37 speedTest EURUSD,M10: initialized 12:45:38 speedTest EURUSD,M10: create time = 920 12:45:38 speedTest EURUSD,M10: search time = 93 12:45:43 speedTest EURUSD,M10: delete time = 4805 12:45:43 speedTest EURUSD,M10: uninit reason 0 12:45:43 Script speedTest EURUSD,M10: removed 12:46:09 Script speedTest EURUSD,M10: loaded successfully 12:46:16 speedTest EURUSD,M10 inputs: count=200000; 12:46:16 speedTest EURUSD,M10: initialized 12:46:27 speedTest EURUSD,M10: create time = 11153 12:46:27 speedTest EURUSD,M10: search time = 202 12:46:58 speedTest EURUSD,M10: delete time = 30592 12:46:58 speedTest EURUSD,M10: uninit reason 0 12:46:58 Script speedTest EURUSD,M10: removed
Yes, they are as they provide visual cues to what is occurring in the market and decisions to vary some of the strategies are made based on them. Yep, historical ones can be deleted.
EDIT: Note that objects are also used in testing and this is where the access speed of objects becomes a particular problem.
If you think it's something important not only for you, you can make the suggestion to Metaquotes by writing to the Service Desk.
But you can be sure you need more solid arguments than what you posted here.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Problem – Object Search Time
I refer to my previous post titled Feature Request - Access Global Variables By Index.
There is also a similar search time problem with object functions which use an object name to locate an object on a chart.
EA creates, modifies and deletes a significant number of chart objects which are used for visual display in the one-week testing period.
Searching for a chart object as the number of objects increase requires incrementally more computing search time to locate that object. Testing has shown that as the number of objects increases the time required to locate an object increases exponentially.
Feature Request – Access Objects by Index
If index values are used to locate objects then the time required to access those objects will be substantially reduced. The time saving for accessing objects by index should be greater than the time saving for accessing global variables by index if there are more objects than global variables.
The above can be implemented, as for the global variable functions, by adding an index implementation to the object functions.
Future Considerations - Improved Objects
Accessing objects by index value should make it computationally practicable to have a large number of concurrent modifiable objects on a chart including pixel objects. This would enable video to be displayed on charts.