What is the most efficient way to compare Buffers?
In my EA I do a lot of comparisons among Custom Indicators' Buffers.
Just to make it easier for understanding, consider the comparison like:
So, considering the two above Indicators, would it be faster (and memory efficient) to continue this approach, or to adopt the following procedure?
- To create custom Buffers within each indicator, loading (as an example) a BOOL value;
- Make the above comparison inside the CALCULATE() routine and load the custom buffer with the result;
- Check these buffers in my EA.
I appreciate any light on this.
Thank you Dominic, your answer enlighted me a lot!
Exactly because indicators run in their thread, I supposed that transferring the calculation to their buffers would get faster results and better efficiency.
In my EA I do a lot of comparisons among Custom Indicators' Buffers.
Just to make it easier for understanding, consider the comparison like:
So, considering the two above Indicators, would it be faster (and memory efficient) to continue this approach, or to adopt the following procedure?
- To create custom Buffers within each indicator, loading (as an example) a BOOL value;
- Make the above comparison inside the CALCULATE() routine and load the custom buffer with the result;
- Check these buffers in my EA.
Using the sample above, I would have this code in my EA:I appreciate any light on this.