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

Instructions for use of the BK instruction:

  • 1. Used for commodity futures and cryptocurrency spots or futures to open positions for buying long.
  • 2. Used for stock market to buy, but with STOCKT0 or STOCKT0_PLUS loaded on the stock market does not appear signal

// followed by the text interpretation of the use method

Application in futures and cryptocurrency

Application in filtering models

  • 1. The instruction does not specify the number of trading lots, and the number of lots is the fixed lot size set by the module.

Example:

CLOSE>MA(CLOSE,5),BK;

Close price is greater than 5 period moving average, buy long, the number of orders is the fixed number of lots set by the module

  • 2. The instruction specifies the corresponding group, does not specify the number of trading lots, the number of lots is the fixed number of lots set by the module.

Example:

CROSSUP (C, MA (C, 5)), BK ('A');

Group A buy long instruction, the closing price up cross the 5-period moving average, buy long, the number of orders is the fixed number of lots in the module Application in non-filtering model

  • 1. the instruction specifies the number of trading lots, the number of lots are fixed lots

a. The number in the brackets after BK are placing order lots, which can be any positive integers

b. After the number of trades is specified, the number of lots set by the module is invalid.

Example:

CLOSE>MA (CLOSE, 5), BK (5);

closing price is greater than 5 cycle moving average, buy long 5 lots. The number of lots set by the module is invalid.

  • 2. the instruction specifies the number of trading lots, the number of lots are the variables

a. The calculation formula in parentheses after BK can be arbitrarily written, and the calculation result is the number of lots.

b. The decimal of number is based on the principle of rounding down.

c. After specifying the number of lots, the number of lots set by the module is invalid.

Example:

CLOSE>MA(CLOSE,5), BK(MONEY0.5/(CMARGIN*D));

The closing price is greater than the 5-period moving average, and the position is 50% of the theoretical available funds to open the long position. The number of lots set by the module is invalid.

  • 3. The instruction specifies the corresponding group and specifies the number of trading lots.

a. In the following example 1, the "1" position lot in the brackets after BK is the number of position opened.

b. The number of orders placed is a fixed lot or variable.

c. The placed orders are variables and the result contains decimals number, and the decimals number adopt the downward rounding principle.

d. After specifying the number of lots, the number of lots set by the module is invalid.

Example 1:

CROSSUP(C,MA(C,5)),BK('A',1);

Group A buying long instruction, the closing price up cross the 5-period moving average line, the number of lots is a fixed lot, 1 lot

Add a Comment

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