Download MetaTrader 5

Close & Open size

To add comments, please log in or register
kerneltrick
18
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!

whroeder1
16572
whroeder1  
Download more history
kerneltrick
18
kerneltrick  
whroeder1:
Download more history
That doesn't seem to be the issue
Taras Slobodyanik
20229
Taras Slobodyanik  

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

kerneltrick
18
kerneltrick  
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 😛
Mladen Rakic
65800
Mladen Rakic  
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

kerneltrick
18
kerneltrick  
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.

Keith Watford
Moderator
10541
Keith Watford  
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.
kerneltrick
18
kerneltrick  
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.

To add comments, please log in or register