amibroker

HomeKnowledge Base

How to fix side-by-side configuration error in 64-bit version

When 64-bit version of AmiBroker is installed, the setup program checks in the system registry if required runtime libraries are present, and if not – then it downloads and installs proper runtimes from Microsoft website. However – it may sometimes happen that the information in the system registry indicates that the required runtimes are installed, while in fact they are missing or incomplete. In such situations we may see the following error displayed when launching AmiBroker:

The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log for more detail.

To fix the problem we need to install Microsoft C++ runtime libraries vcredist_x64.exe manually. Correct x64 VC2005 runtime required by 64-bit version has the version number 8.0.50727.6195

It can be downloaded and installed from:
http://www.microsoft.com/en-us/download/details.aspx?id=26347

More documentation can be found at
http://support.microsoft.com/kb/2538242

NOTE: This article applies only to AmiBroker 64-bit from version 5.60 to 5.90. It does NOT apply to any 32-bit version of AmiBroker.

FastTrack data configuration and troubleshooting

General configuration process for FastTrack datasource is explained in the manual:
http://www.amibroker.com/guide/h_extsources.html

Sometimes however, after the configuration process the FastTrack data source is still missing from the list of sources in File->Database Settings. If that happens, please follow the steps listed below to make this source available:

First you need to make sure that you are using 32-bit version of AmiBroker as FastTrack is 32-bit application and only the other 32-bit application can use its data via their API. To check what version of AmiBroker you have go to Help->About window. If you do not have proper version, please download 32-bit one from http://www.amibroker.com/download.html

Secondly you need to install FastTrack for the Web (FT4Web) program. If you are using Windows Vista, Windows 7 or Windows 8, it is good idea to first turn OFF User Access Control (down to “Never notify”). The following video shows the process:
http://windows.microsoft.com/en-US/windows7/Turn-User-Account-Control-on-or-off. Then install FastTrack for the web (FT4Web) program.

If the FastTrack datasource is still missing from the data source combo in Database Settings, then it is necessary to check if:

  1. FT.DLL is inside “AmiBroker/Plugins” folder
  2. FastTrack.DLL file is installed by FT4Web inside Windows folder

If it can not be found in the Windows folder, we need to make sure that FastTrack for the web is installed, then perform a search for FastTrack.DLL file using Windows Explorer file search.

Once the FastTrack.DLL file is found, we need to copy it to AmiBroker main folder – then FastTrack datasource should then become available in AmiBroker.

How to increase font size for UI elements

In order to change / increase font size used for AmiBroker user interface elements, we can choose one of the following solutions:

  1. Set higher DPI in Windows Control Panel, or
  2. Set font size for individual UI elements such as list views using Windows Control Panel,

To set higher DPI in Windows Control Panel, follow the instructions below.

If you are using Windows 7 or Windows 8:

Open Screen Resolution by clicking the Start button, clicking Control Panel, and then under Appearance and Personalization, click Adjust screen resolution. Then click Make text and other elements larger or smaller

Control Panel

Now set the size of fonts choosing Medium or Larger in order to increase fonts globally.

Control Panel

For Windows XP – please follow the Microsoft documentation presented here:
https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/display_use_large_or_small_fonts.mspx?mfr=true

It is also possible to avoid changing all fonts globally and enlarge fonts e.g. for list views only. This can be done by adjusting the default icon system font in Control Panel.

If you are using Windows 8:

the Icon font can be changed in the same dialog as DPI settings discussed previously:

Control Panel

If you are using Windows 7:

In order to access the respective dialog – click on the desktop area with right-mouse button, click Personalize in the context menu, click on Window Color, then click on Advanced appearance settings option at the bottom.

Alternatively, navigate to Control Panel and in the search field in the top-right corner enter ‘window color’ – then pick Change window colors and metrics from the search results.

Then adjust Icon font in the Window Color and Appearance window as shown below:

Window Color and Appearance

For Windows XP – the procedure to get to the dialog is explained here:
http://windows.microsoft.com/en-us/windows-xp/help/setup/personalize-windows-xp

Finally, if we just want to change fonts used by the charts, i.e. X/Y axis, Title and text tool font – it is definable directly in Tools->Preferences->Miscellaneous, Axis font field.

If we want to change AFL Formula Editor font, it can be set in Tools–>Preferences–>Editor page.

How to synchronize backtesting setup on different computers

When comparing the output of back-tests obtained from different working machines, it is necessary to make sure that all aspects of our testing are identical, including:

  1. the database
  2. the formula used for testing
  3. the settings

In order to synchronize data – the best is to copy the entire local database folder. Using just the same data source, especially if it is real-time feed may not be enough due to different array lengths or some corrections that may have been applied in historical data on data-vendors server in between.

In case of any differences in results between two computers that is the very fist thing to check, as different input would result in different output.

To find out that the data are different you may simply create a checksum of data columns, using code like shown below:

Filter Status("lastbarinrange");
AddColumnCumHigh Low Close Open ), "Price checksum");
AddColumnCumVolume ), "Volume checksum" );
AddColumnBarIndex(), "Number of bars");
AddSummaryRows); // add total sum of columns

By running this code on both computers you can compare checksums to see if they are the same.

In order to transfer the formula and settings to the other machine it is enough to:

  1. select Analysis window
  2. use File->Save from the main menu and save the APX file
  3. open the same APX file on the other computer

If data, code and settings are identical, then the obtained results will also stay in sync.

How to configure alerts to work with SSL e-mail accounts

In order to send e-mail alerts to accounts requiring SSL (secure socket layer) connection you need to follow these steps:

  1. Download and run SSL add-on from: http://www.amibroker.com/bin/SSLAddOn.exe.
    Extra steps for 64-bit installs only: By default EMailerSSL.exe program is installed into AmiBroker 32-bit installation folder – but it is also possible to use it with 64-bit version of AmiBroker with some additional steps:

    1. Create C:\Program Files (x86)\AmiBroker folder (if 32-bit version of AB is not installed)
    2. Run SSLAddOn.exe from the link above
    3. Copy EMailerSSL.exe from C:\Program Files (x86)\AmiBroker folder to C:\Program Files\AmiBroker folder

  2. Configure account in the Tools->Preferences->Alerts, for example GMail configuration looks as follows:

    Email alert configuration for GMail

  3. In certain cases the e-mails may be blocked by default Gmail account settings. If the authentication fails with an error message, it may be required to visit: https://www.google.com/settings/security/lesssecureapps and switch Access for less secure apps to Enable as shown below:

    Email alert configuration for GMail

How to backup AmiBroker configuration

By default AmiBroker stores all its files and databases inside AmiBroker installation folder. Standard AmiBroker installation path is:
C:\Program Files\AmiBroker (32-bit program installed on 32-bit Windows or 64-bit program installed on 64-bit Windows)
or
C:\Program Files (x86)\AmiBroker (32-bit program installed in 64-bit Windows)

The best way to secure our setup is to make a copy of the entire AmiBroker folder with all its subfolders. No special tools are required for this operation – the entire directory can be copied into new location using Windows Explorer.

That allows to quickly restore the entire working setup if anything goes wrong just by copying the whole contents of AmiBroker folder back.

We need to remember that if we store our databases in locations outside AmiBroker folder, then we would need to backup the database folders as well. The same applies when we use custom location for Formula tree root path defined in Tools->Preferences->AFL. If the formulas are stored outside AmiBroker folder, then they would need to be copied as well.

For the purpose of handing individual elements of the configuration – the list of AmiBroker important files is available in the manual:
http://www.amibroker.com/guide/x_files.html

In particular, in order to backup / restore layouts we need to copy the entire Formulas folder, broker.newcharts file and the layout files you have in the other machine. This is because layouts refer to certain charts recognized by their chart ID number. So – all elements have to be present:
.awl files (holding layouts calling certain charts recognized by their ID)
broker.newcharts file which contains list of charts (their IDs) and their corresponding formula files
– contents of Formulas folder – to have formula referenced by certain charts

It is also good idea to have a backup of your entire disk. Such disk-imaging programs allow to restore entire computer setup in a matter of minutes without need to re-install Windows and all the programs. Two popular disk imaging programs are: Macrium Reflect or Acronis True Image and they allow backups to be done even while you are working.

For advanced users:

Certain settings and customizations of user interface are stored in the system registry. AmiBroker uses keys under:

HKEY_CURRENT_USER\Software\TJP\Broker\

Using Regedit tool allows to backup and restore registry keys too. To export AmiBroker registry key follow these steps:

  1. Click Start, type regedit.exe in the search box, and then press Enter
  2. Find HKEY_CURRENT_USER\Software\TJP\Broker\
  3. Right-click on the selected key and choose EXPORT from the context menu and save the file.

The following Microsoft KB article explains the procedure:
http://support2.microsoft.com/kb/322756

Make icons larger on high DPI displays

When running AmiBroker on high-DPI displays like Retina screens, 4K screens or small tablets with hi-res displays the toolbar icons may become so small that they are difficult to use.

To solve the problem you need to choose Tools->Customize menu to display Customize dialog, go to Options tab and
select Large Icons check box as shown in the picture below.

Options page, Large Icons

Do NOT use “registry cleaners” to avoid problems

Every now and then a user contacts support saying that some functionality (like OLE interface) stopped working and after some e-mail exchange it turns out that the culprit was a “Registry Cleaner” program that was run and deleted some vital registry entries.

I already warned users NOT to use “registry cleaners” or “memory turbo” here:
http://www.amibroker.com/guide/x_performance.html

These programs are written pretty much often by amateurs and they often blindly delete registry entries that they assume are “no longer used”. First off, there is no freaking way a 3rd party program can ever determine when a registry key is “unused”. It was evidently put there for a reason and could have been accessed hundreds or thousands of times. “Registry cleaners” usually make assumptions that are simply not valid. For example, they may check for the presence of file referenced by the registry key, but they silently ignore the fact that the file may be on removable media (such as USB disk) and that Windows may change drive letters when new drive is inserted. In such cases “registry cleaner” would delete perfectly valid registry key causing problems with the software that was using this key.

AmiBroker can live with most of its registry entries deleted (you would lose all your UI customizations though) with one exception: OLE. AmiBroker exposes OLE automation server (Broker.Application) and if 3rd party “registry cleaner” wipes its registry keys, the OLE would stop working. This affects also auto-import feature in AmiQuote as it relies on AmiBroker’s OLE automation server.

So bottom line is: To avoid problems DO NOT USE “registry cleaners”.

More evidence of problems caused by “registry cleaners” can be found here:

  1. Why I don’t use registry cleaners

  2. Are registry cleaners safe to use?
  3. Registry cleaner won’t speed up your PC

Now, what to do if you already run registry cleaner and have problems?
The solution is to use full setup again. You do NOT need to uninstall anything, you don’t need to delete anything. Just run the setup again over existing installation, with “Full Installation” option selected as shown in the picture below:

Full setup

That should cure the problem with OLE within seconds. Good luck!

AmiBroker on tablets and smartphones

AmiBroker is a Windows-only application, so you can not run it natively on iPad, iPhone, Android tablets or smartphones or other devices operating an ARM processor.

To run AmiBroker natively on tablet, you need a tablet with full Windows version and Intel processor. There are plenty of such tablets available, some of them very competitively priced: MS Surface Pro (pricey) and Asus Transformer T100, Dell Venue 8 Pro, Acer Iconia W4-821 which are very nicely done and extremely well priced.

You can also consider using remote access tools like TeamViewer or LogMeIn and just accessing your PC over the web from your tablet and/or smartphone.

AmiBroker on an Apple Mac (OSX)

AmiBroker is a Windows application and does not have native Mac version, however we do have many Apple Mac users, who use Parallels (www.parallels.com) virtualization software in order to run AmiBroker on Mac and AmiBroker works perfectly fine in such configuration.

Next Page »