very weird error:"array out of range" on mql5

 

Hi.I have a very weird error on experts tab metatrader. Maybe it is a bug of mql5. Line 130 is ok. But line 133have error.

I will attach the total code of my indicator too.But my only question is about line 130 and 133.

Anyone can help me?

Files:
Untitled1.png  16 kb
H-RSI-ver1.mq5  33 kb
111.png  8 kb
 
Yu Jia Zi Qu:


Please, insert code correctly: when editing a post, click     Code and paste your code in the popup window 
MQL5.community - User Memo
MQL5.community - User Memo
  • www.mql5.com
You have just registered and most likely you have questions such as, "How do I insert a picture to my a message?" "How do I format my MQL5 source code?" "Where are my personal messages kept?" You may have many other questions. In this article, we have prepared some hands-on tips that will help you get accustomed in MQL5.community and take full advantage of its available features.
 
  1. Yu Jia Zi Qu: .I have a very weird error on experts tab metatrader. Maybe it is a bug of mql5. Line 130 is ok. But line 132 have error.

    There is nothing wrong with line 132. The array exceeded error is on line 133 as stated in the error message.

  2. Yu Jia Zi Qu: Anyone can help me?

    Do you really expect an answer? There are no mind readers here and our crystal balls are cracked. Always post all relevant code (using Code button) or attach the source file.
         How To Ask Questions The Smart Way. (2004)
              Be precise and informative about your problem

    We can't see your broken code.

 
This is not strange but very common, there is something going out of range in line133, letter 60.
 
Tobias Johannes Zimmer #:
This is not strange but very common, there is something going out of range in line133, letter 60.
I am sorry.one of my images has not been uploaded.I fixe it now
 

.My question is : why I have an error on line 133.But I do not have  error on line130.While they are both same.

 
Yu Jia Zi Qu #:
I am sorry.one of my images has not been uploaded
I am not good at estimating letters but in the moment when e=0, e-1 will be negative. But you can't have a negative number of fields in an array. That makes it out of range. This is just a guess though.
 
Tobias Johannes Zimmer #:
I am not good at estimating letters but in the moment when e=0, e-1 will be negative. But you can't have a negative number of fields in an array. That makes it out of range. This is just a guess though.

Thank you for your answer.But thats wrong .In both if conditions , e==1518.

so (e-1)==1517.

As you can see on experts tab image.

both conditions is exactly same.

 
Vladimir Karputov #:
Please, insert code correctly: when editing a post, click      and paste your code in the popup window 
I really apreciate if you check again.
 
Yu Jia Zi Qu #:


Please, insert code correctly: when editing a post, click      Code and paste your code in the popup window 
MQL5.community - User Memo
MQL5.community - User Memo
  • www.mql5.com
You have just registered and most likely you have questions such as, "How do I insert a picture to my a message?" "How do I format my MQL5 source code?" "Where are my personal messages kept?" You may have many other questions. In this article, we have prepared some hands-on tips that will help you get accustomed in MQL5.community and take full advantage of its available features.
 
William Roeder #:
  1. There is nothing wrong with line 132. The array exceeded error is on line 133 as stated in the error message.

  2. Do you really expect an answer? There are no mind readers here and our crystal balls are cracked. Always post all relevant code (using Code button) or attach the source file.
         How To Ask Questions The Smart Way. (2004)
              Be precise and informative about your problem

    We can't see your broken code.

I really apreciate if you check again too. This is a really weird Problem

Reason: