30/01/2022
网格策略合约版介绍
合约网格是基于经典网格策略做了几点优化的网格套利策略。
较经典网格而言,首先增加了合约的功能。在经典网格中,经常遇到资金不足导致只能布置数量少的网格,以至于很容易就脱网了,增加合约的杠杆后,可以使用较少的资金创建网格,网格的范围和数量也可以相应增加,提高支撑上涨或下跌的幅度。
其二,平仓的距离远于加仓的(当然,你也可以设置平仓距离小于加仓的)。经典网格的,当价格下跌一个网格时买入,上涨一个网格时卖出这份资产,而合约版的网格策略将加仓的网格间距和平仓的网格间距分开设置的。这样,可以增加每次收益的比例。
其三,追高开仓。在经典网格中,创建策略时以设定好网格范围,当突破上轨后,所有仓位都将全部平仓,而合约网格是在当前价格往下(多单为例)两个网格分别挂一单做多挂单,以及若是价格往上也会开多单仓位。如上图所示的BUY #2的多单。
其四,增加整体止盈或止损的功能,在策略日益运行的时候,不可避免的会有较多离现在价格较远的持仓,增加整体止盈/损就是为了避免这种情况。
交易规则与流程
首先把资产按照设置的参数分成若干份,每次交易的资产U固定。
若是创建做多方向的网格,则策略中只允许做多;反之则只允许做空;震荡则为同时做多和做空。
开启策略后,按照设定的交易方向,用一份资产U做多单A₁(或空单或一份多单一份空单)。
以多单为例,为多单持仓A₁设置止盈挂单,止盈价为PA1×(1+R),PA1为A1的开仓价,R为固定的止盈比例,一般比网格间距比例D要大。
从现价Pn往下每固定比例D设定网格线,Pn-1=Pn×(1-D),Pn-2=Pn-1×(1-D)……从现价Pn往上每固定比例D设定网格线,Pn+1=Pn×(1+D),Pn+2=Pn+1×(1+D)……
当价格往下或往上走到网格线价格,且当前网格线没有还未平仓的仓位的,则用一份资产U做多单A2,和多单持仓A1一样,为多单持仓A2设定止盈挂单。
整个策略达到指定的盈利或损失后,即平仓全部仓位,并终止本次策略。
交易方向选择做空的,则与上述的相反;震荡的,则为一套做多的和一套做空的。
下面将详细介绍各项参数对策略的作用。
各项参数如何设置
总投资保证金:
为这个策略投入的保证金。特别注意的是,开仓的保证金只为“总投资保证金”的一小部分而已,例如总网格数50个的,则每次开仓保证金为“总投资保证金”的五十分之一。另外,系统不会锁定您的资产,因此开启了策略后,你的余额只要足够开单次的开仓保证金就不会停止策略,因此请注意开启策略后,不要随意手动转出这部分的资产,或被其他策略占用了。
交易方向:
做多,策略执行中只允许开多单;做空,只允许开空单;震荡,多单和空单分开计算,同时做多单和空单。
网格间距:
从首单价格交易价格为起点,价格每往上或往下这个“网格间距”比例设定一个网格线,当价格触碰网格线且此网格线上无未平仓的持仓时开仓。
多单利润间距:
“交易方向”开启“做多”或“震荡”时需填写“多单利润间距”。 此比例用于为每个多单持仓设定止盈,公式为:
止盈价 = 单一网格持仓的开仓价 × (1 + 多单利润间距)
空单利润间距:
“交易方向”开启“做空”或“震荡”时需填写“空单利润间距”。此比例用于为每个空单持仓设定止盈,公式为:
止盈价 = 单一网格持仓的开仓价 × (1 – 空单利润间距)
多单/空单网格数:
“交易方向”开启“做多”或“震荡”时需填写“多单网格数”;“交易方向”开启“做空”或“震荡”时需填写“空单网格数”。此为最多可以开仓的份额,达到最大值后将不再开仓,如设定多单和空单网格数均为50,当多单未平仓持仓达到50个后,往后还未达到止盈的,则不再开仓多单,而只开仓空单。“多单/空单网格数”越多,网格范围越广,越安全。
止盈比例:
策略执行过程中盈利达到总投资保证金的此比例时,全部平仓,并终止策略。盈利包括平仓的累计盈利和当前持仓的浮亏盈亏。
止损比例:
策略执行过程中,亏损达到总投资保证金的此比例后,全部平仓,并终止策略。亏损计算为当前持仓的浮动亏损减去平仓了的累计盈利。
策略风险介绍
合约网格策略是每份持仓盈利固定比例后止盈平仓的策略,因此需要行情要往盈利方向前行的策略,当预期价格往后将会上涨的,则开始策略的时候选择“交易方向”为“做多”或“震荡”而非“做空”。
其二,作为合约策略,请注意杠杆比例,杠杆比例高是有高收益,但也同时增加风险。
其三,“多/空单网格数“越多越安全,和“网格间距”结合,越大保护的价格往亏损方向走的距离越大。
其四,按我们大量个数据回测显示,请务必要设置“止盈比例”,策略一直执行不可避免会有很多持仓留在离现在很远的价位上,要达到这些持仓止盈会比较困难的,因此整体止盈后,再次重新开策略从第一单成交开始会更优。
投资有风险,入市需谨慎。
Introduction to grid strategy contract
Contract grid is a grid arbitrage strategy based on the classical grid strategy.
Compared with the classical grid, it first increases the function of contract. In the classical grid, we often encounter the shortage of funds, resulting in only a small number of grids can be arranged, so that it is easy to get off the grid. After increasing the leverage of the contract, we can use less funds to create the grid, and the scope and number of grids can be increased accordingly to improve the range of supporting the rise or fall.
Second, the distance of closing positions is far from that of adding positions (of course, you can also set the distance of closing positions to be less than that of adding positions). The classic grid strategy is to buy when the price falls by one grid and sell the asset when the price rises by one grid, while the contract version of the grid strategy sets the grid spacing of adding positions and the grid spacing of closing positions separately. In this way, the proportion of each income can be increased.
Third, catch up and open positions. In the classic grid, the grid range is set when creating the strategy. When the track is broken, all positions will be closed, while the contract grid is to hang one order for multiple orders in the two grids below the current price (multiple orders as an example), and open multiple positions if the price is up. Multiple orders of buy #2 as shown in the figure above.
Fourth, increase the overall profit / loss stop function. When the strategy is running day by day, there will inevitably be more positions far from the current price. Increasing the overall profit / loss stop is to avoid this situation.
Transaction rules and procedures
First, divide the asset into several parts according to the set parameters, and the asset U of each transaction is fixed.
If a multi direction grid is created, only long is allowed in the policy; Otherwise, only short is allowed; Shocks are both long and short.
After opening the strategy, use one asset u to make multiple orders a ₁ (or empty orders or multiple single empty orders) according to the set trading direction.
Take multi order as an example, set the profit stop hanging order for multi order position a ₁, and the profit stop price is PA1 × (1 + R), PA1 is the opening price of A1, and R is the fixed profit stop ratio, which is generally larger than the grid spacing ratio D.
From the current price PN down, set the grid line for each fixed proportion D, PN-1 = PN × (1-D),Pn-2=Pn-1 × (1-D)... From the current price PN up, set the grid line for each fixed proportion D, PN + 1 = PN × (1+D),Pn+2=Pn+1 × (1+D)……
When the price goes down or up to the price of the grid line, and there is no open position in the current grid line, use one asset u to make long order A2. Like multi order position A1, set the profit stop hanging order for multi order position A2.
After the whole strategy reaches the specified profit or loss, close all positions and terminate this strategy.
If the trading direction chooses to be short, it is the opposite of the above; Concussion is a set of long and a set of short.
The effects of various parameters on the policy will be described in detail below.
How to set various parameters
Total investment deposit:
The margin invested in this strategy. It should be noted that the margin for opening positions is only a small part of the "total investment margin". For example, if there are 50 grids, the margin for each opening position is one-fifth of the "total investment margin". In addition, the system will not lock your assets. Therefore, after the strategy is opened, your balance will not stop the strategy as long as it is enough to open a single position margin. Therefore, please note that after the strategy is opened, do not manually transfer out this part of assets or be occupied by other strategies.
Transaction direction:
Long, only multiple orders are allowed during policy implementation; Short, only short orders are allowed; Shock, multiple orders and empty orders are calculated separately, and multiple orders and empty orders are made at the same time.
Grid spacing:
Starting from the transaction price of the first order price, a grid line is set for each "grid spacing" ratio of the price up or down. When the price touches the grid line and there is no open position on the grid line, the position is opened.
Multi order profit spacing:
When "trading direction" turns on "long" or "shock", it is necessary to fill in "multi order profit spacing". This ratio is used to set profit stop for each multi order position. The formula is:
Stop profit price = opening price of single grid position × (1 + multi order profit interval)
Empty order profit interval:
When "trading direction" turns on "short" or "shock", it is necessary to fill in "blank order profit margin". This ratio is used to set the profit stop for each empty position. The formula is:
Stop profit price = opening price of single grid position × (1 – empty order profit interval)
Number of multiple single / empty single grids:
When "trading direction" turns on "long" or "shock", it is necessary to fill in "multi order grid number"; When "trading direction" turns on "short" or "shock", it is necessary to fill in the "number of empty order grids". If the maximum number of open and closed positions in the grid reaches 50, the maximum number of open and closed positions can no longer be set. If there are more than 50 open and closed positions in the grid, the maximum number of open and closed positions can be set. The more "multiple single / empty single grids", the wider the grid range and the safer it is.
Stop ratio:
When the profit during the implementation of the strategy reaches this proportion of the total investment margin, all positions will be closed and the strategy will be terminated. Profit includes the accumulated profit of closing positions and the floating profit and loss of current positions.
Stop loss ratio:
During the implementation of the strategy, after the loss reaches this proportion of the total investment margin, all positions will be closed and the strategy will be terminated. The loss is calculated as the floating loss of the current position minus the accumulated profit of the closed position.
Introduction to strategic risk
The contract grid strategy is a strategy of stopping profit and closing positions after a fixed proportion of profits per position. Therefore, it is necessary for the market to move forward in the direction of profit. When the price is expected to rise in the future, when starting the strategy, select the "trading direction" as "long" or "shock" rather than "short".
Second, as a contract strategy, please pay attention to the leverage ratio. A high leverage ratio has high returns, but it also increases risks.
Third, the more "multiple / empty single grids", the safer it is. Combined with "grid spacing", the greater the protected price, the greater the distance to the loss direction.
Fourth, according to the back test of a large number of data, it is necessary to set the "profit stop ratio". It is inevitable that many positions will remain far away from the current price after the implementation of the strategy. It will be difficult to stop the profit of these positions. Therefore, after the overall profit stop, it will be better to reopen the strategy again from the first transaction.
Investment is risky, so we should be cautious when entering the market.
GR BOT 量化 (无年费,无激活套餐)
1月15日最新下载链接:
最新安卓版 版本号 1.0.15
(注册) http://lh.www.168ylb.com/...
复制到浏览器打开安装最新版本.
App下载地址
https://app.168ylb.com/juwAY4
IOS网页版登入地址
http://h5.glowrich.live
GR Academy 商学院
http://www.grbot.co
GR Home Page 官网
http://home.grbot.co
#数字火币 #量化 #免费炒币机器人 #币安合约 #元宇宙