Overriding default AA settings

Whenever I restart AB, the default AA settings are restored, and of particular interest is 'portfolio level settings'. How do I make this setting not restore on restart, or alternatively, how do I override this programmatically? Thanks for any help.

It does not change analysis settings of last opened analysis tab on restart. And if multiple analysis tabs are open (side by side) before closing AB then the analysis settings of most right analysis tab are saved and loaded on next AB restart and if opening new analysis tab from File - New Analysis or via + button right of chart tab. So then it may happen that there are new default settings if multiple analysis tabs (being open side by side) have different analysis settings. But if you open only single analysis tab each time then the settings do not change (if they are kept untouched).

If you want to ensure particular analysis setting for a certain AFL then you should work with analysis project files (which save all settings and AFL).

Besides you can save and load analysis settings (see picture).
50

If you work with OLE then you can load analysis project files see Example 1 on this page at the bottom. Also you can load project files via new batch.

Also you can load saved analysis settings via OLE (not required if using project files).
e.g.

// Old analysis code
AB = new ActiveXObject("Broker.Application");
AA = AB.Analysis;
AA.LoadSettings("C:\\Program Files\\AmiBroker\\AASettings.abs");
4 Likes