Errors, bugs, questions - page 3148
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
That's because IndBuff is not allocated to rates_total + 1
And ArrayResize is not applicable to it.
They broke the for construct. Do we have to use if-arses now?
for(int i=limit - 1;....
at least...
This is because the IndBuff is not allocated to rates_total + 1
and ArrayResize is not applicable to it.
for(int i=limit - 1;....
at the very least...
You know what's most annoying? That any behaviour is cheated on silently, without warning.
And then people get hurt. I'm sick of this metatrader.
You know what's most annoying? That any behaviour is cheated on silently, without warning.
And then people get hurt. I'm sick of this metatrader.
You know what's most annoying? That any behaviour is cheated on silently, without warning.
And then people get hurt. I'm sick of this metatrader.
I have not noticed any changes in the calculation of indicators. As you've seen above, Nikolay has rightly explained what the limit values calculated as rates_total-prev_calculated mean.
And it has been working for years - since the fourth terminal.
This is where you need the minus one :))
Nikolay I know constructions if and for one,
but I always worked with for, I just got used to it, it's more convenient.
But I've noticed some strange things with for a long time ago and I've been putting off trying to figure it out.
It used to work fine before
for i>=0 ticks
for i>0 bars
And no ifs were needed.
Step 1: Create a template using 'MQL5 Wizard':
Step 2: Spell 'limit' correctly and USE the close array - NOT the iClose call!!!
Result:
And there are no errors.
Step 1: Create a template using 'MQL5 Wizard':
Step 2: Spell 'limit' correctly and USE the close array - NOT the iClose call!!!
Result:
and there are no errors.
Thanks for the direct i++ example of course.
But the fact that I have a reverse loop, you haven't noticed.
And if iClose is cited as an example, it must be used to show that the i index will be subsequently used in other functions.
Nikolai I know the constructions of if and for one,
else if
this is where
is wrong - better use
if limit != 1
So the whole logic is roughly what it is:
I understand that some people will be indignant and say why should I recalculate everything if limit == 2,but when limit is not equal to 1 and not equal to 0, it means that this is the first initialization of indicator or something went wrong (for example, connection failure or server failure)
Moreover, many times I came across situations when prev_calculated was higher than rates_total. Probably, it was some glitch before and it was fixed now, but since then I use this design as a safety precaution.
if limit != 1