#pragma
- sets AFL pre-processor option

Miscellaneous functions
(AmiBroker 4.40)


SYNTAX #pragma optionname
RETURNS NOTHING
FUNCTION Sets various AFL pre-processor options. Pre-processor is a part of AFL engine that processes formulas BEFORE they are executed. #pragma allows to change pre-processor behaviour. Preprocessor is responsible for inclusion of external files via #include command.
Pre-processor #pragmas can also affect behavior of Analysis window and declared static variable prefixes

Currently #pragma supports the following commands:

  • #pragma nocache - causes that #included files are not cached so they are re-read with every execution

    #pragma nocache must be placed before any #include commands Note: between '#pragma' and 'nocache' there must be exactly SINGLE space
    Note 2: disabling caching may slow down execution of the formula (especially in indicators) !!!
  • #pragma maxthreads N - causes Analysis window to limit number of parallel threads to N
  • #pragma enable_static_decl "prefix_string" - enables static variable declarations with specified prefix
  • #pragma sequence(list_of_actions) - defines sequence of actions to be performed automatically when you press "Run Sequence" button in the Analysis window
EXAMPLE #pragma nocache
#include "myfile.afl"
SEE ALSO #include() function

References:

The #pragma function is used in the following formulas in AFL on-line library:

More information:

See updated/extended version on-line.