Skip to content

Coding Standards

Pritesh Mhatre edited this page Jan 7, 2020 · 3 revisions

Library Files

AmiBroker libraries are available in AFL files, we will name each file as per following convention.

%category%-util.afl (Example: text-util.afl)
.

AFL library files must contain functions belonging to their respective category. Example: A library for processing text data must not contain functions for numeric operations etc.

Any functions which are specific for region, must be written separately. Example: A library with functions which are specific to Indian markets must not be mixed with global library.

Coding Standards

We mostly follow coding standards for Java programming language. More details are available on Java Coding Standards.

The code should be well formatted, easy to read and understand.

AmiBroker does not have unique package and class names structure, hence there is a high chance of function name collision (when a function with the same name is defined in two or more libraries). Hence always use meaningful prefixes to library functions.

Documentation

We are very strict on the documentation. Detailed documentation must be present in the code as well as on the wiki. Documentation must include examples.