Close & Open size

 

Hi all,

It looks like the Close and Open arrays starts with a 1000 elements of history in it by default. I discovered this while printing out ArraySize() during testing.  Is there a way to make it start bigger?


Thanks!

 
Download more history
 
whroeder1:
Download more history
That doesn't seem to be the issue
 

You can start early and wait for as many bars as you need.

 
Taras Slobodyanik:

You can start early and wait for as many bars as you need.

Thank you for response. I need 2000. Using 1 hour bars. That's only 41 days early I guess 😛
 
kerneltrick:

Hi all,

It looks like the Close and Open arrays starts with a 1000 elements of history in it by default. I discovered this while printing out ArraySize() during testing.  Is there a way to make it start bigger?


Thanks!

I am assuming that you are using mt4 (mt5 does not allow less than 5000 bars on chart)

Set the max bars on chart (in tools->options->charts) to larger number and restart the terminal

 
Mladen Rakic:

I am assuming that you are using mt4 (mt5 does not allow less than 5000 bars on chart)

Set the max bars on chart (in tools->options->charts) to larger number and restart the terminal


Thanks for your reply, it was already at 65,000.

 
kerneltrick:

Hi all,

It looks like the Close and Open arrays starts with a 1000 elements of history in it by default. I discovered this while printing out ArraySize() during testing.  Is there a way to make it start bigger?


Thanks!


It is not clear from your post, but are we to assume that you are referring to the strategy tester?

Taras Slobodyanik:

You can start early and wait for as many bars as you need.

ie Only allow the EA to calculate when Bars>2000 or whatever you require.
 
Keith Watford:

It is not clear from your post, but are we to assume that you are referring to the strategy tester?

ie Only allow the EA to calculate when Bars>2000 or whatever you require.

Thank you for your reply. Yes I was/am talking about the strategy tester. The methods I'm testing work better with more history. Thank you for the idea. I will try that.

Reason: