FMZ Quantified My Language - Parameters of the My Language Exchange Library

Author: The Little Dream, Created: 2020-06-17 17:47:34, Updated: 2023-10-08 19:49:55

img

The strategy for writing trends in Macanese is very simple, thanks to the packaging, using only a few lines of code to write a strategy.Inventors quantify My language (Mylang) documentationIn addition, there are some missing guidelines. In this article, we'll play the Mayan language on FMZ. The Mayan language on FMZ can be divided into two aspects: digital currency spot, digital currency futures, and let's sort out the differences in the use of different markets. Let's look at the most important first.

Ma language trading library

The "MacLanguage transaction library" is an integrated package of values, parameters, and patterns that require user settings, away from the policy code level, and a framework library that is set and configured by the user when creating the real disk.

img img img

Knowledge of these parameters and settings is essential for proficient mastery of the Macan language strategy on FMZ. We will learn the concept and use of each parameter together below.

"Transaction settings" grouped

  • How to execute The method of execution收盘价模型实盘价模型

    • The closing model The closing-price model means that every time a new K-line column is generated, a transaction logic is executed. For example, the following diagram uses a 5-minute K-line cycle, when the time is 10:45:01, at which time a new 5-minute K-line column is generated, and the real disk executes a one-time scripted strategy code logic, showing only the completed K-line on the K-line chart (i.e. the second decimal column), which is updated only when the first decimal column is completed (i.e. the first decimal column becomes the second decimal K-line).

      img

      img

      Simply put, it is the moment when the last K-line column is completed and the new K-line column of the cycle comes out, that the disk program executes an established strategy logic ("written trading strategy code"). The advantage of this model is that it avoids the interference of real-time price movements during the cycle, and only looks at the market data at the time of the last K-pillar formation as a basis for the strategy of buying and selling. The disadvantage is that there is a possibility of opening positions, and the strategy will only be acted upon after the last K-pillar cycle is completed.

      As shown above, the time difference between the status bar and the policy chart is 8 hours, due to a mismatch in the time zone settings of the device where the administrator is located and the current display chart browser.

    • Real-time pricing model The real-time price model refers to the continuous execution of the established strategy logic based on the real-time market conditions. Once the trading conditions in the strategy are triggered, the trading instructions are immediately executed. The advantages of this model are that the market is monitored in real time, without waiting for confirmation, the trading instructions are immediately executed. The disadvantages are that the market is easily disturbed frequently.

      img

      img

  • Default number of hands When writing the Mac language policy, if no single-number parameter is specified for BK, SK, BPK, SPK, then the single-number parameter is specified for that parameter; for example:

    MA5^^MA(C,5);
    MA10^^MA(C,10);
    CROSSUP(MA5,MA10),BK;
    

    At this point, if the "default number of hands" is set to 2, then the execution condition of the policy BK isCROSSUP(MA5,MA10)When triggered, the buy-in amount is 2 (specifically, 2 hands, 2 coins or 2 contracts to see which exchange is added, is it a digital currency spot or digital currency futures). The following are examples from the retesting system:

    img

    To see the exchange object that you have added to your own configuration on the exchange page:

    img

  • Maximum number of orders per transaction Maximum number of single orders allowed, if the order size is larger (set by the instruction parameter in the policy or by the default number of open positions) when the signal is triggered, the order will be broken down into smaller orders when the order is executed.

  • The number of sliding price points (integer) This parameter is in the grouping of "Trading at a Discount".定价货币精度Parameters are related, mainly used to set the premium to be added or subtracted when ordering a transaction, for example, when it is necessary to buy, when the opponent sells one at a price of 10, we pay the price of 11, when 11-10 = 1, the extra 1 yuan difference is the slip price, sell on the contrary, the part sold is the slip price, the purpose of the slip price is to ensure the transaction.

    For example, in commodity futures trading, different varieties have different priceTick (i.e. one-time price), and the same is true in digital currency trading if the price of the order is not a multiple of the priceTick, for example.i2009Iron ore 2009 contract, price jump is 0.5, if I order 760.1, this does not meet the requirements of priceTick, such an order is unsuccessful, the exchange will reject this order, if the order is 760.5 is okay.

    The system will automatically retrieve the priceTick of the current variety (price currency accuracy parameter not valid), set at this time.滑价点数The price of a product is the product of the price of the product and the price of the product.

    img

    The price jump is 1e-7 or 0.0000001 when we set the number of slippage points to 5.

    img

    img

    Since the information provided by digital currencies such as price jumps is not uniform, and some are provided and some are not. The parameter "Priceed Currency Precision" is needed to control. For example, the parameter "Priceed Currency Precision" is set to 2, i.e. the order price is accurate to the second decimal place, i.e. 0.01 in the current transaction.

    img

  • The longest cycle of a variable The maximum number of cycles of data to be stored, if this parameter is set to 200, then the various data sequences calculated in the policy, such as the average line, MACD indicator line, etc., will only store data on the most recent 200 K lines.

Futures options

  • Breed code

    img

    This parameter is mainly used数字货币期货The market is set to contract code, seeDocumentation in the Ma language

    • The future of digital currency In the API documentation:Contract codeI'm not going to lie.

    This parameter is set to invalid if the exchange object added to the policy is a digital currency spot.

The real disk option

  • Automatically restore progress

    Selecting this parameter, when the policy is stopped and restarted, will continue the previous hold, and the signal will continue to run instead of using the initial state. If you want to run the policy in the initial state, you can not select this parameter.

  • Number of attempts If there is no transaction (for example, if the market changes quickly, the price is not set to a large extent, the order may have moved when the order is placed); cancel the order to re-order, this parameter controls the number of times the order is re-ordered, the number of times it is no longer ordered, the signal execution is complete.

  • Network turnaround time (milliseconds) It is only for digital currency futures, cash validity, and control of the frequency of procedure rotation.

  • Account synchronization time ((seconds)) Read the account data at intervals.

  • Position synchronization time after opening position (milli-seconds) Mainly used on digital currency futures exchanges, sometimes the interface of digital currency futures exchanges will return old data, causing a position judgment error, thus causing the strategy to repeat orders. This parameter setting can be enlarged to mitigate such problems.

  • Leverage multiples This parameter is only used for digital currency futures, setting the leverage of digital currency futures, the range of leverage supported by different digital currency futures exchanges, the number of values may vary, depending on the specific setting.

Cash and cash equivalents

  • The first-hand volume This parameter is only valid for spot transactions in digital currencies, i.e. the default order quantity is set

  • Minimum number of transactions For digital currency spot, as opposed to the concept of precision, which is always easy to confuse here, precision refers to a small number of precision to the other, not to say the size of the number. Minimum transaction volume refers to the minimum number of orders, if the next order is calculated below this value, the next order is not traded (for example, insufficient funds, incomplete transactions, one point of excess transaction, etc.).

  • Precision pricing This parameter refers to the precision of the price at the time of the transaction ("price decimal number"), which affects the "slip price point number" parameter we mentioned earlier. For some transactions priced in BTC, special attention is needed, as these transactions have very small price values and very many price decimal numbers.

  • Trade variety accuracy This parameter refers to the precision of the lower order at the time of the transaction, controlling the lower order by a small number of digits, for example, the lower order is planned to be 0.1234 coins, which if set to 2, the lower order is adjusted to 0.12;

  • Costs of procedures This parameter is applied to the digital currency spot, the transaction fee parameter is used to calculate the order quantity at the time of placing the order (at the time of payment), to avoid the calculation of the order quantity exceeding the number of assets actually needed to be used, if the exchange transaction fee is not known, the parameter can be set appropriately large.

  • The loss of statistical gaps The earnings statistics in Malayalam are calculated at regular intervals, printing the current floating profit and loss, so they can be calculated regardless of whether or not they are held (digital currency holdings have no real holdings, they are logical holdings).img imgAs shown above, the parameter is set to hourly, and the earnings curve is printed once every hour. The earnings printed are: cumulative earnings + current floating profit and loss.

  • Failed to retry (milliseconds) This parameter is used to determine how many times a call to the interface is repeated when it fails.

  • Use of agents The parameter is mainly used for digital currency futures, digital currency spot, and using SS5 proxies allows the local server administrator to access some of the exchange interfaces that are Q.

  • Hiding common web errors Selecting this parameter can filter some of the log errors.

  • Switching base addresses This parameter is mainly used for digital currency futures, digital currency spot, for switching rest protocol API interface base addresses, such as switching the Binance analogue disk environment:https://testnet.binancefuture.com

  • Push notifications When this parameter is selected, the push message in the following log, policy will be pushed to the push option in the current account settings.

    img

For the Mayan language template parameters we are familiar with here first, the next article we can get acquainted with the Mayan language running interface, charts, etc. on the FMZ platform.


Related

More

qq813380629I need to hang up.

The Little DreamThis architecture in Ma does not support list attachments, you can implement list attachment mechanisms with other language strategies.