The query language contains three major query blocks, which must appear in the following order:
Execute Options
Initialization Statements
Minor Query Blocks
Each major query block contains one or more minor query blocks. The ordering of the minor query blocks within the major query block is flexible, depending on the desired outcome.
Execute Options
Execution time period selection
Graphics configuration options
Profit and Loss testing options
Initialization Statements
LET statements
INITIALIZE statements
FINALIZE statements
FINAL SHOW action
TOP BOTTOM AS-LONG-AS report filtering
Query Blocks
DO SHOW WHEN
DO EVERY UNIT
DO EVERY TRADE
ORDER WHEN EXIT