Questions from Beginners MQL5 MT5 MetaTrader 5 - page 687
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
How do I know why this construct doesn't work?
{
//---
double buf[];
ArrayInitialize(buf,0);
for(int i=0; i<10; i++)
{
buf[i]= i;
}
}
If I replace the string double buf[]; with double buf[10]; then there is no exit outside the array.
Can you tell me why this construction doesn't work?
{
//---
double buf[];
ArrayInitialize(buf,0);
for(int i=0; i<10; i++)
{
buf[i]= i;
}
}
if I replace the string double buf[]; with double buf[10]; then there is no exit for the array.
Either double buf[10];
Or double buf[];, but then necessarily ArrayResize(buf,10);
Either double buf[10];
Or double buf[];, but then I have to do ArrayResize(buf,10);
Thank you.
can i explain something else?
I.e., if I initialize an array and then fill it in the loop, its size will grow with each iteration, and I'll have to redefine its size? I thought this is done automatically, no matter how many elements I add to it.
If I fill it immediately with a certain number of elements, I don't have to do this procedure.
{
//---
double buf[];
ArrayInitialize(buf,0);
int closed1=CopyClose("EURUSD",NULL,0,3,buf);
}
Thank you.
Can I make it clearer?
I.e., if I initialize an array and then fill it in the loop, its size will grow with each iteration, and I'll have to redefine its size? I thought that's done automatically, no matter how many elements I add to it.
and if I fill it immediately with a certain number of elements, I don't have to do such a procedure.
{
//---
double buf[];
ArrayInitialize(buf,0);
int closed1=CopyClose("EURUSD",NULL,0,3,buf);
}
The CopyXXXX() function automatically overrides the size of the array passed into it.
If you fill in the array yourself, if it's dynamic, then it's up to the programmer to make sure it's the right size.
You can, when you declare an array, make it
The CopyXXXX() function automatically overrides the size of the array passed to it.
If you're filling the array yourself, if it's dynamic, it's up to the programmer to make sure it's the right size.
You can, when you declare an array, make it
who knows what the sign between the brackets is?GHPR=(BalanceClose/BalanceOpen)^(1/N)
The bitwise operation is an exclusive OR.
Really? Really?
I always thought that(^) was an exponentiation.
who knows what the sign between the brackets is?GHPR=(BalanceClose/BalanceOpen)^(1/N)