You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Renat, the question was theoretical rather than practical.
So as not to get lost in the fog, I will refer you to an example from the iFractals help. It is true that there is an indicator there, but let's simplify the task to a single calculation of the graphic layout by a script.
Suppose, I intended to find out the times of all the topside fractal bars on the entire history (or on its substantial part on some medium timeframe where there will be plenty of fractals). Did I understand correctly, that it's better to repeatedly disturbCopyTime in loop at FrUpBuffer[shift]!=EMPTY_VALUE to a depth of 1 element:
and get a faster result than to eat the history at once with CopyTime by depth of FrUpBuffer:
and then in the same loop at the same if's just print the fractal bar time values?Both tasks are identical, just implementations are slightly different.
Intuitively I understand that it is longer and more expensive to copy an enormous string of bar times (both fractal and empty) into an array; on the other hand, it's doubtful to pull up CopyTime repeatedly to a depth of 1 element.
If the first variant is faster, is it an absolute gain or it all depends on the total number of fractals encountered (for example, there are much more of them on small TF)?
Herehttps://www.mql5.com/ru/forum/3775/page59#comment_94865 I asked a question about putting declaration, linking, initialization and other actions on multiple buffers of the same type into a loop in order to reduce code and improve readability and manageability. I got an answer with an example (class, structure) and understood it.
Now according to the same principle I tried to tamp down multiple assignments of #property type:
and encountered at least two problems:
1. For on the global level is prohibited, that is, the earliest use of it is not earlier than in OnInit(), but #property is known to be declared on the global level before all the other functions;
2. When trying to assign properties to indicators in the loop in OnInit():
Compiler swears at '#' (as expected): '#property' - unexpected token.Could you tell me if and how the idea is feasible in principle?
Can you tell me how to declare a two-dimensional array of arrays?
Something like this:
Can you tell me if it is possible to declare a two-dimensional array of arrays?
An array of structures with fields as arrays can be declared, the compiler even skips dynamic arrays in the structure:
Can you tell me how to declare a two-dimensional array of arrays?
Something like this:
IgorM, x100intraday
Thanks for the options. I think this should do the trick, I'll give it a try.
IgorM, x100intraday
Thanks for the options. I think this should work, I'll give it a try.
By the way, the name "Buffer" can be changed to "_" or some other riddles, then the call will be completely clear:
By the way, the name "Buffer" can be changed to "_" or something else, so that the call is completely clear:
But how do you do all this with #property? - I wonder...
No idea?
But how do you do all this with #property? - I wonder...
No idea?