MyLanguage basic grammar and instruction description (Part 2/4)

FMZ Quant Platform Syntax

1. Writing Rules

  • (1) All words need to be capitalized;
  • (2) Each line of statements ends with ";";
  • (3) Mark the "//" before the comment line;

2. Variable Naming

“O” “H” “L” “C” is a system keyword and cannot be used as a variable name.

3. Trading Order Conflicts

The filter model does not support the number of lots defined in the instruction, for example: BK(5).

4. Function Conflict

  • The underlying data of "TRADE_OTHER" is one-minute data, which is used with "CHECKSIG_MIN" and "MULTSIG_MIN", but cannot be used with the "CHECKSIG" and "MULTSIG" functions.
  • "CLOSEKLINE"/"CLOSEKLINE_MIN" only supports the closing price model. You can't write the "CHECKSIG"/"CHECKSIG_MIN" function or the "MULTSIG"/"MULTSIG_MIN" function.
  • "CLOSEKLINE" and "CLOSEKLINE_MIN" functions conflict with each and cannot be used together.
  • "CHECKSIG" / "CHECKSIG_MIN" functions, such as "MULTSIG" / "MULTSIG_MIN", the two types of functions are conflicting and cannot be used together.
  • The "CHECKSIG" and "CHECKSIG_MIN" functions conflict with each other and cannot be used together.
  • "MULTSIG" and "MULTSIG_MIN" functions conflict with each other and cannot be used together.
  • "MULTSIG"/"MULTSIG_MIN" indicates one k-line multi-signal that conflicts with the "TRADE_AGAIN" function that indicates one k-line with only one signal but a different k-line command line is valid and cannot be used together.
  • "CLOSEMINUTE/CLOSESEC" only supports the closing price model, and can't write CHECK_MIN/CHECKSIG, MULTSIG_MIN/MULTSIG functions.
  • "CLOSEMINUTE1/CLOSESEC1" only supports the command price model and cannot be used with CLOSEKLINE/CLOSEKLINE_MIN.

5. IF … THEN BEGIN … END syntax

6. Declare Global Variables

  • VARIABLE: VAR1:=X, VAR2:=Y;
  • IF condition 1 THEN
  • VAR1:=VAR1+1;
  • IF condition 2 THEN
  • VAR2:=VAR2+1;

VARIABLE indicates that the variable following the declaration is called a global variable.

  • VAR1 VAR2 global variable name
  • X Y is the initial value of the global variable
  • VAR1:=VAR1+1; indicates assignment to VAR1
  • If the current K-line condition satisfies condition 1, assign VAR1+1 to VAR1, otherwise it is still the value of the previous VAR1.

To be continued...

Add a Comment

Your email address will not be published. Required fields are marked *