Have you tried switching to a pair with no history and then switching to another TF?
Yeah, I admit my mistake. The code shows what to do if Close[i] > Close[i+1] and what to do if Close[i] < Close[i+1]. But it does not specify what to do if Close[i] == Close[i+1]. These are the bars where these single arrows are falling out.
Uh-huh, I admit a bug. The code specifies what to do if Close[i] > Close[i+1], and what to do if Close[i] < Close[i+1]. But it does not specify what to do if Close[i] == Close[i+1]. These are the bars where these single arrows are falling out.
Why do you need such a large margin, as much as 20 bars? Is it by eye? )) In the general case, you can't go beyond [rates_total-1], and in this code - beyond [rates_total-2] because the previous bar is called in the loop's body. So, we need to start calculation from bar [rates_total-2].
Sergei Vladimirov: And why take such a large margin - 20 bars? Is it by eye? )) In the general case, we cannot go beyond [rates_total-1], and in this code - beyond [rates_total-2] because the previous bar is called in the loop's body. So, we need to start calculation from bar [rates_total-2].
I understand. The next thing will be how many bars total to count and how many to recalculate.
Someone will enter more bars than there are bars. It'll be an out.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Genius.
Have you tried switching to a pair with no history and then switching to another TF?
Yeah, I admit my mistake. The code shows what to do if Close[i] > Close[i+1] and what to do if Close[i] < Close[i+1]. But it does not specify what to do if Close[i] == Close[i+1]. These are the bars where these single arrows are falling out.
You know, let's do this: take code 1.43 from this post and comment out the lines:
and look at the result when scrolling the graph to the back of the story and making sure the story is loaded.
Genius.
Have you tried switching to a pair with no history and then switching to another TF?
Uh-huh, I admit a bug. The code specifies what to do if Close[i] > Close[i+1], and what to do if Close[i] < Close[i+1]. But it does not specify what to do if Close[i] == Close[i+1]. These are the bars where these single arrows are falling out.
What do you mean "where there is no history"?
WHAT IS THIS?
It's so there are no outs if anything.
Who are they? ))
Array out of range
And why take such a large margin - 20 bars? Is it by eye? )) In the general case, we cannot go beyond [rates_total-1], and in this code - beyond [rates_total-2] because the previous bar is called in the loop's body. So, we need to start calculation from bar [rates_total-2].
I understand. The next thing will be how many bars total to count and how many to recalculate.
Someone will enter more bars than there are bars. It'll be an out.
Yeah, by eye.