- if Data source setting of File > Database settings is set to local database then number of bars is not limited to default number of bars limit. There is no need to set number of bars in that case.
- Number of bars setting of File > Database settings is relevant only if using data plugins.
- Default 500k bar limit (AB versions 6.17+ have 1Million bars default limit) of number of bars setting is relevant only for data plugins too.
- But also keep in mind that there is no hard coded 500k bar limit at all since it can be changed in registry any time.
Quote by AmiBroker:
The limit is not hard coded... it is here for performance reasons but if you have hyper-fast machine you can adjust the limit by creating the following (DWORD) key in the registry
If you use local database as data source then there is no need to set registry value to a limit higher than 500k (see 1.)! So once again it's related to DBs using data plugins as data source only!
5.it makes no sense to use multiple years of 1min history in real-time data bases -> (recommended) conclusion: use separate data bases (realtime (trading) <-> non realtime DBs (analysis)).
Additional read https://www.amibroker.com/guide/x_performance.html
Now in case you still want to change the (real-time) plugin 500k default limit to a different number of bars here is how to... (in the example the limit is set to 1 Million instead of 500k):
- Go to Windows Start > Run and insert regedit and hit enter
- in the registry editor browse to HKEY_CURRENT_USER\Software\TJP\Broker\Settings
- Right click Settings folder and choose New -> DWORD-value
- insert MaximumNumberOfBars as DWORD name and hit enter
- double click that newly created value and in settings window choose decimal and insert your custom value (new bar limit), in example below I have set to 1000000 (you can set to any reasonable value).
- Click OK and close Regedit
- Set your new number of bars value in AmiBroker
(Note: the registry editor below is not Windows's Regedit but 3rd party freeware called Regmagik. You may use Windows Registry editor instead via Start - Run - Regedit)
If double-clicking MaximumNumberOfBars value then the properties shows up which you may edit