[TOC]
Search for FAQ for easy viewing. How to search for a keyword on posts?
Use Ctrl + f
to open the page and search; enter a keyword, for example: “docker”. Then the location on the page with the word “docker” will be searched.
Currently FMZ International Station only supports cryptocurrency business. Commodity futures, stock securities and other businesses are supported by FMZ domestic station, you can log in: https://www.fmz.cn.
Weixin:
Why buy one price and sell one price obtained by GetTicker
and those obtained by GetDepth
are different?
The data of GetTicker
and GetDepth
might not be obtained at the same time. There is a cetrain time delay, so the data will change. Besides, the data obtained by GetTicker
will be a little bit faster, for the data is less than the data obtained by GetDepth
.
exchang.GetOrders
obtains the unfinished orders, so where to get the executed orders?
There is another API to query orders, that is, exchange.GetOrder
. It queries orders of all types, according to ID
. Enter the order ID
, you will get the order. Therefore, to get executed orders, you need to see if platforms provide this kind of interfaces; the interfaces provided by every platform are quite different.
In JavaScript
strategies, the result of time string converting to timestamp is wrong.
You need to consider of the time zone in the system time settings.
Why the open price and the close price I printed are the same?
1.Maybe at the time when you printed, there was indeed no trading in the platform, so the open, close, highest and lowest prices of BAR are the same all along. 2.You need to check out if the BAR you observed is the last BAR, for the open, close, highest and lowest prices of the last BAR are the same.
Errors of verifying time with server, such as Signature not valid:Invalid submission time or incorrect time format
This error is the problem of old operation systems like windows2000/2003/XP
, please refer to:
We suggest you use Linux
server, or you can install time synchronization software in these windows
systems where the error occurs, to synchronize time at high frequency and prevent the time verification error from occurring.
ATR
(TR
) of Mylanguage and those calculated by TA
/talib
library?The reason is that the calculation method of Mylanguage indicators is inconsistent with the underlying algorithm of TA
/talib
library. Both are correct, but the algorithms are different. Similar to MACD
, some use one DIF-DEA
, and some use twice DIF-DEA
, which are both correct.
What does it represent, if the platform name is Futures_Esunny
?
It represents the exchange object of Esunny Protocol, which can be returned by the function exchange.GetName()
.
Currently, FMZ international station only supports cryptocurrency business. Commodity futures, stock securities and other businesses are supported by FMZ domestic station, you can log in: https://www.fmz.cn.
#EXPORTTEST...#END
declared the variables in the multi-period code block reference. When REF
is used when referencing in the strategy, the data will be referenced according to the current period, which is different from what you expected.The multi-period data you need will be processed in #EXPORTTEST...#END
, so you can directly use it externally.
I cannot find FMZ API documentation.
You can directly enter the page address:https://www.fmz.com/api, or click the link as the following picture:
Why MACD
calculated by FMZ is different from that calculated by platforms?
When comparing, it is necessary to pay attention to whether the K-line periods are the same, whether the MACD
indicator parameters are the same, the time periods are the same, and the symbols are the same. Besides, there are many algorithms of MACD
; some are DIF-DEA
, and some are 2*(DIF-DEA)
; DIF
and DEA
should be consistent.
What is connected to the obtained K-line number, when the history K-line data is obtained?
When accessing the exchange.GetRecords
interface to obtain K-line data, the number of K-lines returned by the specific interface is determined by the platform. It may be that the number of K-lines returned by each platform is inconsistent (even some platforms do not provide K-line interfaces. In this case, the docker will call the interface to obtain the platform history trading data when the strategy calls exchange.GetRecords
. The data interface synthesizes the K-line according to the trading history). The K-lines received by the docker will be continuously accumulated together, and it is necessary to access the exchange.GetRecords
interface with a certain frequency, otherwise, the continuity of the data may be affected.
I find that calling the function exchange.Buy
only returns ID
in API documentation, but why it returns so much information when I operate?
The functions that can generate log export in FMZ API functions, such as Log
, exchange.Buy
, exchange.CancelOrder
, etc., all can be followed by some additional parameters after the necessary parameters . For example: exchange.CancelOrder(orders[i].Id, orders[j])
additionally exports the order information when canceling orders[j]
.
How to perform WeChat Push message in a bot?
WeChat push is only valid on bots; add '@'
in the end of the Log
function, and then the printed information of the Log
can be pushed; you can find the details in API document at: https://www.fmz.com/api#Log
Currently FMZ International Station only supports cryptocurrency business. Commodity futures, stock securities and other businesses are supported by FMZ domestic station, you can log in: https://www.fmz.cn.
The WeChat push is only supported in the domestic station of FMZ.
Can commodity futures use main continuous contracts and index contracts?
It supports the main continuous contracts and index contracts of commodity futures. Currently FMZ International Station only supports cryptocurrency business. Commodity futures, stock securities and other businesses are supported by FMZ domestic station, you can log in: https://www.fmz.cn.
var records = exchange.GetRecords(PERIOD_D1)
is to get daily K-lines, so if I operate futures in a bot, what is the daily K-line of contract obtained? What should I write if I want to obtain the specific contract daily K-line data, such as the K-line data of RB or I?
You should set contract code before obtaining the TAQ (at least set the contract code once since the program starts). Iin SetContractType("rb1805")
, Set the current operated contract to rb1805
. Call again the API that obtains TAQ, you can get the TAQ data of rb1805 contract.
Currently FMZ International Station only supports cryptocurrency business. Commodity futures, stock securities and other businesses are supported by FMZ domestic station, you can log in: https://www.fmz.cn.
How to write the contract code of commodity futures?
You can refer to FMZ API documentation. Currently FMZ International Station only supports cryptocurrency business. Commodity futures, stock securities and other businesses are supported by FMZ domestic station, you can log in: https://www.fmz.cn.
Will exchange.GetAccount
fails to obtain the information due to network and other problems, and has the underlayer of FMZ system already processed the failure? Or do users have to deal with the failure of the request themselves? Why doesn’t FMZ official handle it? Isn’t it more convenient for users to use it in this way?
There will be failures that require users to do fault tolerance. The underlayer of FMZ does not process data, and the data returned to users is unprocessed data. The specific fault tolerance method or logic is formulated by the specific strategy. Because if it is processed, it may affect users’ decision, and the decision will be processed by the strategy, which specifically refer to filtering error information or retry and other processing methods.
What is the unit of the order volume of OKEX contract? Is it the coin amount or the contract amount?
The order volume of OKEX contract is calculated by the contract amount; for example, exchange.Buy(1000,1)
means placing an order at the price of 1000, with the contract amount of 1.
Does it mean to make limit orders when I call exchange.Sell
and exchange.Buy
on FMZ?
For details, you need to look at the first parameter passed in (the first parameter is the order price). Some platforms support market orders. The price parameter passed in -1
to place a market order. The meanings of buy volume and sell volume are somehow different (the second parameter), and if the price is not -1
, that means it is a limit order. In most spot platform order interfaces, the order volume of the market buy order is asset amount not coin amount. In the order interfaces of the cryptocurrency futures platforms, the order volume is generally an integer number of contract amount.
Check out the order interfaces: https://www.fmz.com/api#exchange.buyprice-amount https://www.fmz.com/api#exchange.sellprice-amount
Mail function
Mail("smtp.qq.com", "xxxx@qq.com", "xxx", "xxx@qq.com", "test title", "test body")
Access to QQ’s smtp 203.205.232.7 timed out. At present, most cloud servers are shielded from port 25, except for physical servers, operators will not shield port 25. Most cloud servers can also apply to unseal port 25. I applied and unsealed it.
Template parameters for Pine language, Mylanguage: the number of maximum periods of the variable affects the indicator calculation
By default, the “variable maximum number of periods” is 600, if the indicator parameter is set too large, for example, calculating MA(1000). Then the average value of 1000 data cannot be calculated, because the system only keeps 600 data.
Check the strategy code editing area for any error prompts. Verify if there is a missing variable name when declaring a variable, such as forgetting to write the name in “var name = ‘a’”. Also, check if programming language keywords were used when setting strategy interface parameters. It is not recommended to use commonly used programming language keywords as variable names, as it can lead to conflicts, even if the current programming language does not have that specific keyword.
BITMEX
429 error, {"error":{"message":"Rate limit exceeded retry in 1seconds……"}}
When you see error 429, that means the frequency of accessing a platform is too high. You need to enlarge the polling interval, to reduce the frequency of accessing the interface.
Only support CTP
error
That means you called a commodity futures CTP interface or library in a cryptocurrency strategy. Currently FMZ International Station only supports cryptocurrency business. Commodity futures, stock securities and other businesses are supported by FMZ domestic station, you can log in: https://www.fmz.cn.
Bittrex
error in bots: {"success":false,"message":"NOT_ALLOWED","result":null}
It indicates the platform limits privileges. You can log in the website of Bittrex
, and see if it is necessary to check the information, such as user agreement.
Bot operation error: TypeError:value has no property at
Because the errors reported in the backtest and bot are different, this error cannot be detected during the backtest.
unable to open database
error
If the system is Mac OS
system, pay attention to check out whether it is the a permmision problem.
Or, it could be the error caused by the full space of the device hard drive, which disabled the creation of the bot database file.
Error: do not support the function
It refers to the situation that the exchange object added during the backtest is a cryptocurrency spot platform, but the futures API function is called in the code.
Error: in SetCurrency OSError: exception: access violation reading 0x000000FCF25F0000
In a cryptocurrency futures Python
strategy, the backtest system uses a private docker, and the trading pair is switched in the code, which causes the error to be reported.
The reason is that the backtest system does not support cryptocurrency futures backtest to switch trading pairs.
Error “decrypt” [Image] Due to the FMZ account password was modified, that made the configured API KEY invalid, and raised the error. Solution: configure the platform API KEY again, stop and restart the docker, and then try restarting the bot.
Python
local backtest engine reports EOFerror
.
EOF
error is the error at the end of the backtest. Catch the exception is enough and you can call it anywhere Python
is supported.
# encoding: utf-8
'''backtest
start: 2021-08-30 00:00:00
end: 2022-09-05 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
'''
from fmz import *
task = VCtx(__doc__) # initialize backtest engine from __doc__
def main():
while not exchange.IO("status"):
Sleep(1000)
exchange.SetContractType("swap")
while True:
bars_1min = _C(exchange.GetRecords, PERIOD_M1) # Get 1min K-line
print(len(bars_1min))
_CDelay(2000)
# Calling the main function
try:
main()
except:
print(task.Join(False))
Mylanguage involves a very hidden error of period calculation, and the calculated value may be N/A, such as the following example:
The reason is that the calculation period parameter exceeds the data range, resulting in the calculation of N/A value. Processing method:
An error occurred in Mylanguage: parsing error, and the strategy only has simple code, the number of error lines is very long, and the error cause cannot be found.
It might be an error caused by the problem of early Mylanguage templates. Solution: 1. Export the strategy as an xml file. 2. Create a new empty Mylanguage strategy. 3. Import the xml file into the newly created empty strategy. 4. Add a bot to test.
Error: fatal error:unexpected signal during runtime execution...go routine 11[syscall,locked to thread]
Check whether the strategy written in C++
uses a null pointer, and suggest you use the fault-tolerant mode backtest to detect.
Error of calling exchange.SetMarginLevel(10)
: Futures_OP 0:403:{"error":{"message":"Access Denied","name":"HTTPError"}}
Check if the related privileges of the API KEY
applied by the platform are on.
Backtest error: symbol not set
It is because you did not set the contract in the code during the backtest of the futures platform; you can refer to the exchange.SetContractType
function in the API documentation.
Error ERR_INVALID_POSITION
If the backtest system reports the error, it is generally an error caused by strategy writing faults. If you try to place an order to close a position when there is no position or the number of positions is insufficient, the error will be reported. Check whether there is any position freeze caused by unfinished orders.
Error ERR_INVALID_ORDER
If the backtest system reports the error, it is generally an error caused by strategy writing faults. You should notice to check out the order price (the cryptocurrency futures in the backtest system temporarily does not support market orders), whether the order volume is 0, negative number or decimal fraction (the order volume of futures contracts is calculated by contract amount, which is integer).
Error ERR_INSUFFICIENT_ASSET
If the backtest reports the error, it normally indicates the available asset amount is already not enough for placing the current order. Simply speaking, it means there is no assets for placing an order.
Binding Error:Cannot passnon-string to std::string
error information
In strategy codes, the error is generally caused by the wrong sue of an attribute name (using a undefined attribute).
Error {"status":6004,"msg":"timestamp is out of range"}
The error means the timestamp of the server is out of the range, and you need to update the tiem of the server, without large deviation.
Error timeout
The error is a timeout error, which indicates an error reported due to not getting the response data from the platform interface for a certain period of time after accessing the platform interface. Generally, it is a network access problem of the system where the docker is located (many problems are caused by walls), or a problem of the platform interface. General solution: use overseas servers to run the docker.
Error in the running bot after strategy writing: syntax error invalid label
Error source:
function main(){
if(1){
continue
}
}
//That will cause the error during operation
continue
statement must be used in the loop!
Error: (CTP_T@9999)Error:140CTP:change the password when first log in, and please log in again after changing
. What password is modified?
Here it indicates to modify simnow
account password; when you use a specific futures company account to log in, you also need to modify the password for the first login (a new account has an initial password, and you cannot use the account without modifying the initial password).
Currently FMZ International Station only supports cryptocurrency business. Commodity futures, stock securities and other businesses are supported by FMZ domestic station, you can log in: https://www.fmz.cn.
Error: 400:{"error":{"message":"Nonce is not increasing.This nonce:1523891993165,last nonce:1523891993165","name":"HTTPError"}}
It is a nonce
verification error, and the error information related to nonce
is generally the failure of timestamp verification. You can try to synchronize the time of the system where the bot docker is located.
Error Secretkey decrypt failed
The error indicates the failure of decypting API KEY
. Check if you modified the FMZ account password after you configured the API KEY
. Try to configure the API KEY
on the “Add platform” page of FMZ, restart the docker, and run the bot again to test.
Commodity futures open position Error: CTP: only close position
There are many reasons why the account shows the status of can only close position
. It may be that the account has been frozen (it has not been used for a long time, more than 1 year), or it may be logged in to the wrong channel (CTP has many seats). Solution: contact the futures company where you opened the account to check the account status in order to determine the problem.
Currently FMZ International Station only supports cryptocurrency business. Commodity futures, stock securities and other businesses are supported by FMZ domestic station, you can log in: https://www.fmz.cn.
What reason could it be if the error: GetOrder(455284455):Error:invalid order id or order canceled.
is always raised when I call exchange.Getorder
?
Literal meaning: the order has been canceled or the order ID is invalid. Reason: in some platforms, if you cancel an order, the order information will not be maintained, and it will be eliminated. Therefore, when you query the order in exchange.GetOrder
, the error will be reported, or the order ID you query is originally wrong.
Error: rate limit, 429 Too Many Requests
rate limit, 429 Too Many Requests
indicates the frequency of accessing a platform interface is too high, so you need to reduce the frequency of accessing the platform interface.
Always raise Invalid order price/amount
in the bot and backtest
This kind of errors are caused by the wrong price and order volume passed in when calling the order function exchange.Buy
or exchange.Sell
. For negative order volume, 0 and other error detection methods: you can call Log
to export the price parameter or volume parameter to be passed before placing an order by exchange.Buy
or exchange.Sell
, to determine the problem.
What kind of error is GetOrders:400:{"code":-1121,"msg":"Invalid symbol."}
?
The error means: invalid trading pair. You need to check out if the setting of trading pair is wrong.
What does it mean if there are some error codes when the bot logs report an error?
You can see the explanations for the error codes returned by different platform interfaces in the API documentation of those platforms.
Print time of the real market yield curve of Pine language and Mylanguage Print regularly according to the settings on the Pine language/Mylanguage template parameters, and print when the strategy is completely closed.
Mylanguage bot prints the number of signal trigger lines, but there is no order operation.
It may be that the parameter settings of the Mylanguage template are inappropriate, such as precision, minimum order volume and other parameters. The reason is that the signal trigger layer judged successfully, and at the trade execution layer, it was judged that the order could not be placed due to some problems with the parameters, and no order was actually placed. You can refer to the Mylanaguage related posts: https://www.fmz.com/bbs-topic/9788 https://www.fmz.com/bbs-topic/9791
Why the bot cannot receive the request signal when I already set webhook url alert on Tradingview?
Check whether the API KEY is correct in the webhook url address. The API KEY here refers to the extended API KEY of FMZ, which is set in the account settings in the upper right corner of FMZ. Check whether the bot ID in the webhook url is filled in correctly. Check whether the extended API KEY privileges of FMZ are given correctly. Privileges are separated by commas in English. The default is *, which means all privileges. Do not write the function names with the privileges directly after *.
Why the symbols of currency pair are limited in the platform-trading pair configuration when adding a bot? As far as I know, actually the platform supports multiple trading pairs.
You can set the custom control of trading pairs (it can only be set in bots; for the symbols in the backtest data center are limited, it cannot be set in the backtest), as follows:
Why tickers cannot be obtained when I run FutuOpenD on the server, and can the tickers be obtained on the local device?
You need to check out if the IP address of the server is overseas, for FutuOpenD has limits on overseas IP addresses. Currently FMZ International Station only supports cryptocurrency business. Commodity futures, stock securities and other businesses are supported by FMZ domestic station, you can log in: https://www.fmz.cn.
No action when the Mylanguage strategy is operated, and it only updates the TAQ at first. What is the problem?
Check if you used the close price model, which can be checkd by the strategy Mylanguage template parameters.
Commodity futures “close yesterday position” problem
In CTP, only Shanghai Futures Exchange can be used to close today positions and yesterday positions.
The backtest does not distinguish today positions from yesterday positions, so it cannot specify to close today positions or yesterday positions.
Some symbols in bots, like IF
, have the default that if there are today positions, it will close today positions first. On this occasion, you cannot specify, and you can only close today positions first. Therefore, the position information of today and yesterday positions is merged into one.
Currently FMZ International Station only supports cryptocurrency business. Commodity futures, stock securities and other businesses are supported by FMZ domestic station, you can log in: https://www.fmz.cn.
Why the timestamp of a Bar in BITMEX
K-line data has one more period than that of the same location in other platform K-line data?
The reason is BITMEX
takes the end time of the current Bar as the K-line timestamp (some K-line periods are not supported by BITMEX
interface, so the timestamps of those periods are generated by the starting time of Bar). For example, the right figure:
In the commodity futures strategy, the Profit
in the data returned by the function exchange.GetPosition
is different from the calculated floating profit and loss?
Please refer to API documentation: https://www.fmz.com/api#exchange.getposition. Profit
in CTP protocol
is defined as mark-to-market profit and loss, which represents the profit and loss of your current position relative to the settlement price of the previous trading day.
Currently FMZ International Station only supports cryptocurrency business. Commodity futures, stock securities and other businesses are supported by FMZ domestic station, you can log in: https://www.fmz.cn.
Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch.
Check if the “Custom Data Source” feature is being used and if the data provided by the custom data source service is correct. The reason for this error could be abnormal backtesting market data.
/*backtest
start: 2022-11-08 00:00:00
end: 2023-02-08 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Binance","currency":"BTC_USDT"}]
*/
function main() {
var t = exchange.GetTicker()
exchange.Buy(t.Last - 10, 100/(t.Last - 10))
while(1){
t = exchange.GetTicker()
Sleep(1000)
}
}
In the backtest of Binance futures and BITMEX
, is the funding rate is calculated in the profit & loss curve generated by the backtest system?
The funding rate is calculated in the profit & loss curve generated by the backtest system.
The “Backtest” button cannot be clicked.
You need to check if the proxy is on, which will influence the loading completion of the files on the page of “Backtest”; check if there is any error information on the page console.
In the Real Tick backtest, why there is a limit of 50MB?
The real market level backtest indicates in the real Tick, the TAQ is actually recorded second by second. In addition, there are market snapshots and order flow data, which are of large volume, so only 50MB of data volume is supported. That is, the maximum of the real market level time range is several hours, and the backtest time cannot be extended. The real Tick backtest is mainly used to test high-frequency strategies.
Why it did not work when I modified the fee parameters in the backtest system?
In the backtest system, when you reset the fee parameters, they will be valid after you delete the old platform-trading pair and add the platform-trading pair again; the previously added platform-trading pair cannot be modified by the control on the page.
How to make the backtest custom drawing display more data?
When you draw a custom chart (by the Chart
function), the data volume of drawing displayed in the backtest is related to the chart parameter in the backtest settings, and the parameter controls the maximum bar number of a chart. Notice if the chart.reset
function is used to clear part of the old data.
C++
backtest displayed nothing, there was no error reported and no logs, and nothing on the page changed after I clicked the button.
Some errors of C++
strategies will not be raised, so you can use exclusion method to detect the possible errors that might occur during the operation, level by level. For example: in indicator calculations, the insufficient number of K-lines leads to the comparison and judgement of NAN
and number type after NAN
is calculated, which will cause the program crash.
python
backtest is jammed!
You cannot write the function Sleep
in the try
error detection, and the writing in the image will cause the jam.
In the backtest, why there are only several options for platform, and the symbols for trading pair are also limited?
There are too many trading pairs on platforms, so only a few representative trading pairs were selected for testing in the backtest system. You can choose a trading pair with similar conditions for backtest, and you can use the custom control to set the trading pairs supported by those platforms in bots.
Why the backtest do not support more trading pairs?
The backtest system, for the moment, only supports the mainstream currencies of some relatively large platforms, and some currencies are not yet supported. If you need to test a strategy, you can replace the currencies with other similar currencies in the backtest. In fact, except the market quotes may be affected, using other similar cryptocurrencies to backtest the strategy is fine. Simply speaking, the backtest system tries to support mainstream trading pairs, and the backtest should not match a specific symbol. That is to say, if the strategy is effective, even if it is a series of randomly generated market quote changes with trading rules, or the market quotes of other currencies, there should be basically positive profits. This is the universality of a strategy. If it can only match a period of history data or perform well on a certain symbol, then this strategy actually has potential risks or defects.
In the backtest system: Concepts of Closing P&L, Holding P&L, Margin, Estimated return, Currently available USDT
Closing P&L: It is the accumulated profit and loss of all the transactions opened and closed before the current position. Holding P&L: It is the profit and loss of the current position, if the current position is not held, it’s 0, Margin: The amount of margin occupied by the current position. Estimated return: The profit and loss generated by closing the current position at the current price (hypothetical) is then added to the cumulative profit and loss of the closed position to calculate the estimated return. Currently available USDT: The current amount of USDT available for opening positions.
Winning rate calculation in the backtest system
for (var i = 0; i < profits.length; i++) {
if (i == 0) {
if (profits[i][1] > 0) {
winningResult++
}
} else {
if (profits[i][1] > profits[i - 1][1]) {
winningResult++
}
}
if ((profits[i][1] + totalAssets) > maxAssets) {
maxAssets = profits[i][1] + totalAssets
maxAssetsTime = profits[i][0]
}
if (maxAssets > 0) {
var drawDown = 1 - (profits[i][1] + totalAssets) / maxAssets
if (drawDown > maxDrawdown) {
maxDrawdown = drawDown
maxDrawdownTime = profits[i][0]
maxDrawdownStartTime = maxAssetsTime
}
}
}
The above is the winning rate algorithm, which is calculated as follows: After the backtest system regularly calculates the floating profit and loss, a floating profit and loss curve is calculated. Start from the first point to compare with the next point. If it is higher, it will be recorded as a win, and if it is lower, it will be recorded as a loss , and then continue the comparison with the next point.
Where is the teaching video of deploying Linux
docker?
Bilibili: https://www.bilibili.com/video/BV1eZ4y1c73v?share_source=copy_web
Is it necessary to stop the old one when I update the docker, and delete the robot
program, and run it again?
You can directly delete the old robot
program file without stopping the docker, then download a new compressed package, decompress the new robot
program file, and put it in the original location. At this time, the docker is updated, but the running bot still uses the old version in memory, and the latest version will be used only when the bot is restarted.
Docker deployment of Linux
server
Steps for install a docker on Linux
: https://www.bilibili.com/video/BV1eZ4y1c73v?share_source=copy_web
When using screen
to run the docker program robot
, -bash:screen:command not found
occurs, and the docker cannot run.
Linux
system does not install screen
software, and the general installation is enough. CentOS
system installation command: yum install screen
.
The current docker already supports SSH
to disconnect the switching to run in the background. Instead of using screen
, you can directly use the command in the robot
directory of the docker program: ./robot -s node.fmz.com/xxxxxxx
, and enter the FMZ account password; when Login OK
is displayed, it means the deployment is successful. Note that the xxxxxxx in ./robot -s node.fmz.com/xxxxxxx
is the unique identification code of each FMZ account, and just enter your own (after the account is logged in, jump to the docker page, click “Add docker” to the “Add docker” page to see); notice here is not just to enter xxxxxxx
.
Where is the bot log when a docker is running a bot?
In the DB3
database file in the logs
directory where the docker program is located, the database file name is the id
of the bot, and the extension is db3
.
In Linux
system, use ./robot -l
to view the names of the platforms supported by the docker, what platform is the exchange
among the names?
The exchange object whose name is exchange
refers to the platform that general protocol accesses. The details of the general protocol: https://www.fmz.com/api#通用协议
The docker page does not display dockers in list format.
If more than 5 dockers are added, a control for displaying in list format will appear.
Is it normal there is a docker not deployed by myself in the combo box of docker parameter when creating a bot?
The public docker provided by FMZ is an added quick-start tool for beginners, so the users do not need to deploy a docker when learning, and it is easy for beginners to get started. However, it is recommended to use private dockers for real bot tests. After all, the hardware resources and networks of public dockers are shared; the platform will maintain these public dockers from time to time.
Is the address string (./robot -s node.fmz.com/1234567
) exclusive for me or other, when deploying a docker?
This address is each user’s own address identification, and the value of the /1234567
part of each user is unique to identify the user. When deploying a docker, click the “Add docker” button on Dashboard-> click Add docker->Add docker page, and then you can see this address; copy and paste it directly and you can use it .
The environment variable of the system where the docker is located has added python2.7
, but why is it still prompted that the environment variable cannot be found?
When windows
system first installs python
, you need to set the environment variable and restart to make it valid.
EOF error
Python backtest is terminated by EOF exception (because sometimes a strategy may be an infinite loop). So it is normal to prompt EOF.
How many bots can a docker run?
There is no limit to the number, depending on the server configuration and the complexity of the strategy. Specifically, it is necessary to consider whether these multiple bots access the same platform interface (considering of the frequency of interface calls, because more bots mean higher frequency); generally 5 to 6 bots are fine.
Docker, Bot and other basic concept explanations
Contents of “Bot” and “Docker” pages all disappear
If the contents of the bot and the docker page have all disappeared, when the bot and the docker are both running normally on the server, you need to read the error report message of the browser, to see whether the browser has a plugin installed, which causes the global variable pollution problem. The solution is to write in the plugin of the browser, or use a browser without any browser plugin to log in FMZ.
For the official strategies for rent and one-click renting a docker server, will the fee be automatically renewed, as long as the FMZ account balance is sufficient?
The rented strategies will not automatically recharge fees, and the one-click renting a docker will automatically recharge.
Where is the template function? I want to separate some functions into the template, so other strategies can also use them.
The description in FMZ API
documentation: https://www.fmz.com/api#模板类库
Does the wexApp
simulation platform of FMZ simulated bot only provide BTC_USDT
to choose? How can I customize other trading pairs?
wexApp
simulated bot only supports a few mainstream trading pairs for the moment, and not all trading pairs are simulated.
I have a problem of concurrent calls to the extended API, that is, a “nonce” verification error is always reported during the concurrency.
You can create multiple FMZ platform extented API KEY
s for concurrent requests.
Will the debug threads created on a docker record the log status when using the debug tool?
When the debug tool is executed, if nothing is modified for the second time, the exchange object created before will be retained and will not be released. Therefore, some states will be recorded, such as whether the exchange object is currently in currency mode or leverage mode.
Why when I registered the wexApp
simulated platform and logged in, there was no assets, both in the wallet and the currency section?
After registration, you need to verify your email to activate your account, and you can activate your account in the personal center.
The log information is relatively long and cut off, and in the end it showed"…". But I need to see the structure of the data, what should I do?
The solution is to use the Debug Tool on the Dashboard, and use the return
statement in the debugging tool to return the content to be displayed, and the content display will not be truncated.
What does the functions beginning with $.
in the JavaScript
strategies mean?
The functions with the beginning of $.
are export functions of templates, similar to the interface functions of modules. Refer to the description in API documentation: https://www.fmz.com/api#模板类库
The export functions of the python
strategies are declared with ext.
at the beginning.
How to draw striaght lines on the market chart of the backtest result?
There are two types of charts that are finally displayed in the backtest: one is generated by the system, which the strategy cannot control. The other is drawn by the Chart
function of FMZ API interface in the strategy code. Refer to: https://www.fmz.com/api#chart...
I deleted the Google validator on my phone by mistake, how to reset the Google validator? On the account settings page on the platform, I couldn’t find the place to reset by email.
You can log in to the FMZ platform with another browser, and when you need to enter the Google verification code, click “Enable twofactor” to jump to the page for unbinding by email.
Platform API KEY
security control
The API KEY
of a user is encrypted and uploaded on the browser side. FMZ does not save the plain text information of the user’s platform account, and uses Https
protocol.
Strategy security issue
For that, you can refer to: https://www.fmz.com/bbs-topic/1657.
FMZ billing system
Billing standards for live trading:
The billing time mentioned refers to the processing time for billing operations. Due to the time required for these processing operations, the deduction time may be delayed. For example, if the current billing time is 9:00, it is possible that the processing time for this billing operation is 9:02 (as shown in the screenshot). This will be adjusted during the next billing operation (next deduction time will be 10:00, not an advance billing).
The talib library handles data with limited precision
If the data is particularly small it will be truncated and eventually displayed as 0. Please refer to : https://github.com/TA-Lib/ta-lib-python/issues/157