Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1290
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
---
P.S. In general, there's a lot wrong with the same array, for example.
Thanks for the help and for the tip!!! This is how it compiles
Funct array (BRN, W1) out of range
What can it be?I just tweaked it a bit and it works just fine, before 51.20 it crashes with an error
Funct array (BRN, W1) outside allowed range
What can it be?Try it this way, you have not set the dimensionality of the array
In general, this is not a good solution
Tweaked it a bit, almost works as needed, before 51.20 there crashes with an error
Funct array (BRN, W1) out of range
What can it be?The line that solved the crash.
Correct now? Correct if you don't mind.
Tweaked it a little bit, it's almost working as it should, up to 51.20 there it crashes with an error.
Funct array (BRN, W1) outside allowed range
What can it be?At the same time, you copy a certain number of elements into the HandleFractalUP_W1 array, but you don't control exactly how many.
Then loop through int i=Bars(Symbol(),period); //Number of bars on W1 chart
As the result, you will again get an exit outside the array, but inhandle[n]
Work out some of the filling logic, take your time.
----
The line that solved the crash.
Is it correct now? Correct it if you don't mind.
It's so complicated, but you'll get it right.
The line that solved the crash problem
Is that right now? Correct it if you don't mind.
The only thing is that there are fewer fractals than bars in the weekly chart window, and when filling the array with price values of fractals, only 90 cells are filled, and the rest of the memory layout is redundant So, you should first calculate the number of fractals, and only then apply ArrayResize for memory reservation?
At the same time, you copy a certain number of elements into the HandleFractalUP_W1 array, but you don't control exactly how many.
Then loop through int i=Bars(Symbol(),period); //Number of bars on W1 chart
As the result, you will again get an exit outside the array, but inhandle[n]
Work out some of the filling logic, take your time.
----
It's so complicated, but you'll get it right.
Thank you!!!
Good afternoon, all. Please help me understand why I can't get the volume history. Tried to do it in 2 ways.
First way:
MqlRates mrate5[];
if(CopyRates(_Symbol,PERIOD_M5,1,bars_used,mrate5)<0)
{
Alert("Error in copying historical data for M5 - error:",GetLastError(),"!!");
return;
}
for (int i=0;i<bars_used;i++) {
Print(mrate5[i].real_volume)
}
Second way:
long volumes5[];
if(CopyRealVolume(_Symbol,PERIOD_M5,1,bars_used,volumes5)<0)
{
Alert("Copy volumes error for M5 - error:",GetLastError(),"!");
return;
}
for (int i=0;i<bars_used;i++) {
Print(volumes5[i])
}
In both cases, the array of volumes always contains only zeros. You just cannot get any meaningful information...
Good afternoon, all. Please help me understand why I can't get the volume history. Tried to do it in 2 ways.
First way:
The second way:
In both cases, the volume array always contains only zeros. I just can't get any meaningful information...
Thank you. Do I understand correctly that there is a tick volume?
When I downloaded the quote history for forex from finam site, there was vol in addition to open, high, low, close. You didn't say exactly what volume it was. This is a tick volume?