Thank you. Does the function count evenly? No errors?
You're welcome.
Yes, as long as it's implemented correctly. The custom function is lengthy because it's not a standard function. See my master mq5 file there for that indicator as an example.
Yes, provided it is implemented correctly. Custom function takes a lot of time because it is not a standard function. See my main mq5 file for this indicator as an example.
// Maximum possible number of elements for the array.template <typename T>
ulong ArraySizeMax( void )
{
T Array[];
ulong Left = 0;
ulong Right = ((ulong)::TerminalInfoInteger(TERMINAL_MEMORY_AVAILABLE) / sizeof(T)) << 20;
while (Left < Right - 1)
{
constulong Middle = (Left + Right) >> 1;
if (::ArrayResize(Array, (int)Middle) == -1)
Right = Middle;
else
{
Left = Middle;
::ArrayResize(Array, 0, -1); // https://www.mql5.com/ru/forum/462835/page23#comment_52768225
}
}
return(Left);
}
// The amount of free memory in megabytes.int TerminalMemoryAvailable( void ) { return((int)((ArraySizeMax<MqlTick>() * sizeof(MqlTick)) >> 20)); }
An EX5 analysis tester could know exactly whether there are calls to HistorySelect functions, and then not waste computational resources on generating detailed history tables.
Similarly, could know that there are no calls to bars, and then not waste computational resources creating an environment around the bars.
Etc.
And how do you automatically realise from one place to another in the source code that there are no calls to certain functions? So that, accordingly, you can disable your own unclaimed functionality directly in the source.
iMaOnArray
Thank you. Does the function count evenly? No errors?
Thank you. Does the function count evenly? No errors?
You're welcome.
Yes, as long as it's implemented correctly. The custom function is lengthy because it's not a standard function. See my master mq5 file there for that indicator as an example.
You're welcome.
Yes, provided it is implemented correctly. Custom function takes a lot of time because it is not a standard function. See my main mq5 file for this indicator as an example.
I have copied it. Thanks.
Pay attention to such constructs in your sources. After b5200 they may stop working
Migrating from MQL4 to MQL5 - MQL5 Articles № 17 (2010)
Application.
Result.
An EX5 analysis tester could know exactly whether there are calls to HistorySelect functions, and then not waste computational resources on generating detailed history tables.
Similarly, could know that there are no calls to bars, and then not waste computational resources creating an environment around the bars.
Etc.
And how do you automatically realise from one place to another in the source code that there are no calls to certain functions? So that, accordingly, you can disable your own unclaimed functionality directly in the source.
Please advise why one case has an error and the other does not.
Thanks!