amibroker

HomeKnowledge Base

How to register AmiQuote and AFL Code Wizard

AmiQuote and AFL Wizard are separate applications, therefore the registration process is also separate from registering AmiBroker and requires to enter the unlock code into Help->Register menu in AmiQuote or AFL Wizard respectively. The unlock codes are delivered in the transaction receipt generated after the purchase (sent from SWREG, ShareIt or other payment processor)

In order to register these programs, it is necessary to launch AmiQuote or AFL Wizard first.

AmiQuote can be launched e.g. from the Windows Start menu or by double-clicking on Quote (Quote.exe) program in AmiBroker/AmiQuote folder.

register

Once the program is running, we need to enter the unlock codes into Help->Register AmiQuote menu:

register

Then we can enter our name and the unlock code, then press Update button.

register

AFL Code Wizard can be launched from Analysis menu inside AmiBroker:

register

After the program is launched it’s necessary to select Help->Registration details item from the menu.

register

Then we can enter our name and the unlock code, then press Update button.

register

Using IB controller (auto-trading interface) with 64-bit version of AmiBroker

AmiBroker allows to automate orders execution through Interactive Brokers account. In order to use the auto-trading capabilities it is necessary to install special component that communicates with IB TWS – the interface installer and documentation is available at:

http://www.amibroker.com/at/

By default the IB controller is installed to 32-bit release installation folder. So – that is the following location in 64-bit Windows system:

C:\Program Files (x86)\AmiBroker

If we are using 64-bit version, then it is necessary need to manually copy BrokerIB.exe and BrokerIB.xml files to the installation folder of 64-bit version, by default that is:

C:\Program Files\AmiBroker

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.

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

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.

Lost activation key

In case you lost your AmiBroker activation key please fill the form at:
http://www.amibroker.com/lostkey.html
Once you fill the form, you will have the registration e-mail resent automatically.

Then check your e-mail inbox, there will be an e-mail with the download link to your personal activation key. Download the file, run the activation wizard and AmiBroker will become fully activated.

Please note that the activation keys for 32-bit and 64-bit are separate so you should make sure you are using one that matches your installed AmiBroker version. To check AmiBroker version, go to Help->About menu. Note also that 64-bit version is available only to owners of Professional Edition license (or Ultimate Pack Pro).

Third-party plugins must ship with proper runtime

From time to time we receive questions from people having problems loading some unknown third party plug-ins. These plug-ins are most commonly written by some hobby programmers who don’t know how to compile and ship the plug-ins so they work on client machines.

When plug-in DLL is written with AmiBroker Development Kit (ADK) it is usually compiled with Microsoft C runtime library. The “problem” is that depending on compiler used, different versions of C runtime are required for the DLL to be loaded by the operating system.

For example Visual C++ 6.0 links against MSVCRT.DLL that is commonly found in all Windows starting from Windows XP so you can “forget” about installing the runtime. But when plugin is compiled with more recent Visual C++ 2005, 2008 or 2010 then required C runtime library is almost never present on client computer.

In order to load the plugin compiled with VC2005 or higher, one must install proper run-time library on the client computer. The runtime must exactly match the compiler version and eventual compiler service pack used to compile the DLL, otherwise operating system will not load the DLL. The developer of 3rd party DLL can find appropriate runtimes (vcredist.exe) in

VCInstallDir\SDK\v2.0\Bootstrapper\Packgages\vcredist_x86
or
VCInstallDir\SDK\v2.0\Bootstrapper\Packgages\vcredist_x64

or similar directory (depending on VC version he/she is using). Then such vcredist.exe must be shipped by the plugin vendor to the client for the installation.

Alternatively the plugin vendor can compile their DLL with static runtime library.

There is a freeware tool called Dependency Walker (http://www.dependencywalker.com/) that allows to check what given DLL needs to be loaded by the operating system. Tell your plugin vendor to use that tool so they don’t miss the essential dependencies.

Next Page »