Bars() function return different values when debugging on real/history data

 

Hi,

I use function Bar() to find out how many bars are in history. When I run it for D1 timeframe I receive 437 bars when debugging on history data, but more than 6000 when debugging on real data. I have "Unlimited" number of bars in Tools -> options. Is there some settings for debugging on history data or why I get only 437 D1 bars when debbuging on history data? The same applies to other timeframes, when debugging on real data Bars() and also iBars() return bigger numbers. When I use CopyOpen (or CopyClose, ...) I receive just that much values as Bars() says, so I think Bar() function is OK, I am wondering why I have limited history when debugging on history data and if it is possible to change it.


Thanks for all answers.

 
I don't understand anything. What is the difference between "history data" and "real data" ?
 
Alain Verleyen #:
I don't understand anything. What is the difference between "history data" and "real data" ?
When you use MetaEditor, there is option Debug -> Start on Real Data (F5) or Debug -> Start on History Data (Ctrl + F5).
 
Lukáš Židzik #:
When you use MetaEditor, there is option Debug -> Start on Real Data (F5) or Debug -> Start on History Data (Ctrl + F5).

Ah ok.

On history data you get approximatively 1 year of history from the starting date of your backtest.

 
Alain Verleyen #:

Ah ok.

On history data you get approximatively 1 year of history from the starting date of your backtest.

And there is no option to change it? To have longer history?
 
Yes of course. Just request the data by code. If your broker provides it, the tester will download it.

You can query the data in the terminal using CTRL-U.