Uncustomized number of positions based on position number

Author: 17732164739, Created: 2023-11-15 15:09:18, Updated: 2023-11-15 15:45:51

I'm trying to figure out in okx how to level up a single stack or how to level up multiple stacks or empty stacks, not by custom number of stacks, but by stack number.
exchange.SetDirection ((closebuy)) exchange.Sell ((-1, 1) can't do that, can't customize the number of balances


More

The Little DreamYou know what? function main (() { // POST /api/v5/copytrading/close-subposition instType : SPOT / SWAP, subPosId is used for this purpose. var tradeType = "SPOT" // If it is a perpetual contract, write SWAP var subPosId = "xxxxx" // Location ID var ret = exchange.IO (("api", "POST", "/api/v5/copytrading/close-subposition", "instType=" + tradeType + "& subPosId=" + subPosId") Log ((ret)) I'm not sure. What's up? I think that's about it.

The Little Dream/upload/asset/16da3d5e574f1d5032e1.png This is a list of all the different ways Da3d5e574f1d5032e1.png is credited in the database. The trader's trade operation is to call the interface here, using the exchange.IO call. The exchange.Buy/Sell is just an ordinary market price list, a limit price list, and an order list function.

The Little DreamIt's not polite. The policy is in JavaScript, you can refresh it, clear the cache, and see if it solves the problem.

The Little DreamClear the cache or force refresh the page, try it.

17732164739I'm getting an error: Uncaught RuntimeError: Aborted (((). Build with -sASSERTIONS for more info You see, I don't know what the reason is, it's like the last iteration was normal, changing the parameter won't work, changing back won't work.

17732164739I was wondering if using webhook to push messages on our platform is not the same as using exchange.SetDirection (("buy"). var result = exchange.Buy ((-1, amount) such an open position, you just need to push out the open position signal, let the webhook receiver execute the open position, but there is a problem is that position = exchange.GetPosition (()) can not get hold information, mainly can not get hold price, how should this be handled, by calculation to get the average price?

The Little DreamI don't have any relevant information on this side of the page.

17732164739I'm in the patent industry, and I'm trying to train a GPT that specializes in writing patents, or I don't know how to do it, do you have any kind of tutorial that I recommend or give some experience, thank you.

The Little DreamIt's what it says in the documentation: http requests url > https://www.fmz.com/user-guide#%E5%AE%9E%E7%9B%98%E6%B6%88%E6%81%AF%E6%8E%A8%E9%80%81

17732164739Good night, how do you set up the message format for this push signal?

The Little DreamThis means that a webhook is used to push a message, which is then received by a program. For example, it can be your other quantification system, interface, etc. An example written in golang is a program script that receives a request. It is used to test the push effect of a webhook url that you set in the push settings on the FMZ platform.

17732164739Good dream, I want to ask you about this specifically how to set up this golang service program, how to write it, where to write it, is there a tutorial here, it's troubling you, I really don't know much about this part

The Little Dream /upload/asset/16113ad8d68015391a1b.jpg

The Little DreamThe PINE and Mac highly-encapsulated scripts, which are mainly trend-driven, define that they cannot be stored in both directions at the same time. If you want to write a strategy that is stored in both directions at the same time, it is recommended to use javascript/python/cpp.

17732164739I have a problem with how to write a strategy in the pine language, how to hold positions in both directions, how to get position information for multiple empty positions at the same time, fun hasLong))) => strategy.position_size > 0 fun hasShort() => strategy.position_size < 0 does not seem to work

17732164739I've looked at this document and I can't find what you're talking about, can you tell me specifically what I'm trying to do is push trading signals out through our platform and let other platforms' robots receive trading signals, similar to tradingview.

The Little Dreamhttps://www.fmz.com/syntax-guide#fun_log documentation has a push example at the end of this chapter.

17732164739The problem is that in the signal push setting, webhook push, can you set the format or content of the push, is the same function as trading view

The Little DreamThe specifications of the different contracts differ, and the calculation is based on the specific contract specifications. This template can be used for conversion calculations: https://www.fmz.com/strategy/276298

17732164739So I'm going to need to convert each currency over and over again, not really, can you give me an example?

The Little DreamDepending on the specific rules of the contract, the exchange can be exchanged differently. For example, the OKX BTC spot contract costs $100 per contract.

17732164739I've figured out that the amount that I've calculated above is actually the number of coins, not the number of bills, so how do you convert that into the number of bills of exchange?

The Little DreamFor example, if a U-bit contract has USDT as collateral, then the USDT of 1% of total assets is calculated, this amount is converted into the number of contracts of the corresponding variety to be traded, and then the number of contracts to be ordered is judged to meet the minimum order size requirements of the exchange, and if so, the order is placed.

17732164739I have a few questions to ask you, and here is my part of the opening strategy for var price = exchange.GetTicker(currency).Last; var account = exchange.GetAccount (); var available = account.Balance * positionSize*bei; var amount = _N ((available / price,0)); exchange.SetDirection (("buy") var result = exchange.Buy ((-1, amount); oh so I meant to set the amount of money I'm going to use on each trade as a percentage of my total capital, but I'm going to use 1 percent to calculate the amount of money I'm going to use, and after okx, the amount of money I'm going to use is going to be a multiple of the minimum amount of money I'm going to use, and the minimum amount of money I'm going to use is going to be different for different currencies.

The Little DreamI'm not being polite.

17732164739Thank you very much.

The Little DreamYou know what? var createResult = exchange.IO (("api", "POST", "/api/v5/tradingBot/grid/order-algo", "", JSON.stringify ((params))); What's up? Try this one.

17732164739I'm still a kid about code, I don't know much about it, can you please help me change it?

The Little DreamThe fourth parameter of the exchange.IO function is urlencode, and the fifth parameter is raw, which can be transmitted in JSON (depending on the actual parameters needed by the exchange).

17732164739It's always an error, my JSON.stringify ((params) printed out is like this: {"instId":"XRP_USDT","algoOrdType":"contract_grid","maxPx":2.8925,"minPx":0.5785,"gridNum":38,"runType":"1","sz":22.01,"direction":"long","lever":"10","triggerParams":[{"triggerAction":"start","triggerStrategy":"instant"}]} also looks fine, why would there be Futures_OP 4: {"code":"50014data":[],"msg","algoOrdType can't be empty"}

17732164739Good dreams, I have a code that calls OKXAPI and it always returns an error, I don't know where the problem is, can you help me see it, thank you, my code is like this: var params = { "instId": uuuSymbols[i], which is a symbol that represents the user's identity. "algoOrdType:" contract_grid, "algoOrdType, " "algoOrdType", "contract_grid", "contract_grid", "contract_grid", "contract_grid", "contract_grid", "contract_grid", "contract_grid", "contract_grid", "contract_grid", "contract_grid", "contract_grid", "contract_grid", "contract_grid", "contract_grid", "contract_grid", "contract_grid", "contract_grid", "contract_grid", "contract_grid" "maxPx": maxPx, which means "maxPx, which means "maxPx", "minPx": "minPx", which means "minPx". "gridNum": the gridNum, "runType" is: 1 "sz": sz, "direction": direction, "Lever": lever, which means "lever". "Trigger Params": [This is a video of the video] {pos (192,210) } "TriggerAction": "Start", and "TriggerAction": "TriggerAction" is used to trigger the action. "TriggerStrategy": "instantly" This is the first time I've seen this. I'm not sure. I'm not sure. I'm not sure. var createResult = exchange.IO (("api", "POST", "/api/v5/tradingBot/grid/order-algo", JSON.stringify(params)); the API documentation for OKX to be called is also as follows: body {pos (192,210) } "instId": "BTC-USDT-SWAP", and "BTC-USDT-SWAP", which is the same as "BTC-USDT-SWAP". "algoOrdType": "contract_grid", "maxPx": "5000", and "500", and "500", and "500". "minPx": "400", and "400", and "400". "gridNum": 10 and 10, "runType": "1", "sz": "200", and "200", and "200". "direction": "long", "lever": two, "Trigger Params": {pos (192,210) } "TriggerAction": "Start", and "TriggerAction": "TriggerAction", and "TriggerAction" are also used. "Trigger Strategy": "rsi", which is the name of the game. "timeframe": 30M, "hold" is 10, "TriggerCond": "cross", "cross", "cross", "cross", "cross", "cross", "cross", "cross", "cross", "cross", "cross", "cross", "cross", "cross", "cross", "cross", "cross", "cross", "cross", "cross", "cross", "cross", "cross", "cross", "cross", "cross" "timePeriod": 14 I'm not sure. {pos (192,210) } "Trigger Action": "Stop", and "Trigger Action": "Stop", and "Trigger Action": "Stop", and "Trigger Action": "Trigger Action" and "Trigger Action": "Trigger Action" and "Trigger Action": "Stop", and "Trigger Action": "Trigger Action" and "Trigger Action": "Trigger Action" and "Trigger Action": "Trigger Action" and "Trigger Action" and "Trigger Action" and "Trigger Action" and "Trigger Action" and "Trigger Action" and "Trigger Action" and "Trigger Action" and "Trigger Action" and "Trigger Action". "Trigger Strategy": "Price", "Trigger Strategy": "Trigger Strategy": "Price", "Trigger Strategy": "Trigger Strategy": "Price", "Trigger Strategy": "Trigger Strategy": "Trigger Strategy": "Trigger Strategy": "Price", "Trigger Strategy": "Trigger Strategy": "Trigger Strategy": "Trigger Strategy": "Trigger Strategy": "Trigger Strategy": "Trigger Strategy": "Trigger Strategy": "Trigger Strategy": "Price" is the name of the game. "TriggerPx": 1000, and the first one is "TriggerPx". "StopType" is: 2 I'm not sure. I'm not sure. I'm not sure. I don't think there's a problem, why would there be an error in Futures_OP 4: {"code":"50014","data":[],"msg:"algoOrdType can't be empty"}

The Little DreamHi, this is useless, you can go through this array, switch to transaction pairs one by one, and then operate.

17732164739If I put all the currencies in an array, would I need to select each currency on the real-time console?

17732164739Good dreams, thank you very much.

The Little DreamYou can try the code and it won't work.

17732164739I understand a little bit, thank you very much.