For loop in an EA

 
I wrote an EA where I use the maximum and minimum values of a currency pair. To do this I have to calculate the maximum and minimum values through a for loop that analyzes the previous data. The problem is that with the MT4 platform the for loop doesn't give me more than 1000 items. Can I set some parameters to get a for loop with more than 1000 elements?
 
Mrz85891 The problem is that with the MT4 platform t

How To Ask Questions The Smart Way. (2004)
          Don't rush to claim that you have found a bug.
Questions Not To Ask
          My program doesn't work. I think system facility X is broken.

It is almost always your code.

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.

 
Mrz85891: I wrote an EA where I use the maximum and minimum values of a currency pair. To do this I have to calculate the maximum and minimum values through a for loop that analyzes the previous data. The problem is that with the MT4 platform the for loop doesn't give me more than 1000 items. Can I set some parameters to get a for loop with more than 1000 elements?

If you are referring to the Strategy Tester, then 1000 is about the limit you will have at the start of the test for the current symbol/time-frame. As the test progresses, there will be more bars available.

To work around the issue, start your test with an earlier date, and place a condition in your EA to only start the analysis and the trading at a specific later date of your choosing.

Reason: