Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1496
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
Thanks for the tip. I didn't know. I'm inserting this line just in case.
Do I understand your joke correctly that rates have all prices averaged and take the bar into account, but ticks do not? That's why I took tick to use an arbitrary time interval, not bar prices. CopyRates in my similar formula filled the copied variable with the maximum value of ulong type for the hour interval. I could not solve this problem either.
Everything is wrong.
MqlRates is a structure, and you treat it as a variable.
MqlTick is also a structure.
You are trying to combine warm and soft, so the compiler does not understand you.
Neither do I)))))
Perhaps I could suggest something useful, but it is not clear from your code what you are trying to find.
It's all wrong.
MqlRates is a structure, and you treat it as a variable.
MqlTick is also a structure.
You are trying to combine warm and soft, so the compiler does not understand you.
Neither do I))))
Perhaps I could suggest something useful, but it is not clear from your code what you are trying to find.
The task is to modify WPR (Williams Percent Range) so that to get the difference of WPR values for an arbitrary period of time, regardless of bars.
It is possible (but not certain) that this is what you wanted to get.
double lowestLow = ArrayMinimum(bid, 0, copied);
Thank you. Here is what I got, if I understood the lesson correctly:
But, unfortunately, on the line bid_arr[i] = ticks[i].bid; the Expert Advisor got off the chart because of array out of range in 'namemyexpert.mq5' (204,12).Thank you. Here's what came out, if I've learnt my lesson correctly:
Since we are looping through all ticks anyway, we can not copy in this loop, but look for the maximum-minimums at once.
By the way, if we copy, it would be good to first set the sizes of the arrays where we copy, the loop will not do it for us, we will fly out of the array at the first iteration. Only CopyTicksRange will resize the target array itself.
Since we cycle through all ticks anyway, we can not copy in this cycle, but look for those maximum-minimums at once.
By the way, if we copy, it would be good to first set the sizes of the arrays where we copy, the loop will not do it for us, we will fly out of the array at the first iteration. Only CopyTicksRange will resize the target array itself.
I'm a perfectionist, sorting individual elements of an array of structures is like hitting glass with Styrofoam.
Since we cycle through all ticks anyway, we can not copy in this cycle, but look for those maximum-minimums at once.
By the way, if we copy, it would be good to first set the sizes of the arrays where we copy, the loop will not do it for us, we will fly out of the array at the first iteration. Only CopyTicksRange will resize the target array itself.
Sorry. My inattention. Corrected. Thanks. I forgot that the ArrayMaximum value is an index, not a price. But it's fixed now.
Since ArrayMaximum didn't work with the ticks array, I tried alternative calculations, with if in a loop. Why is that better?
Why is it better?