输入/搜索内容

Unilateral grid strategy (2018-08-21 14:55:37)

通用策略
创建日期: 2018-08-21 12:34:07
最后修改: 8 年前
复制: 0
点击次数: 1218
0
关注
80
关注者

网格可以自定义方向
先买后卖:
网格会从首价格开始向下挂买单, 每个买单间隔 "价格间隔" 这个参数, 挂单数量为"单笔数量", 挂够 "总数量" 个买单, 有任意买单成交以后, 程序会在买价基础上加 "价差(元)" 这个参数的的值的价格挂出卖单, 卖出, 卖出以后,重新按原来这个网格的价格挂买入单
先卖后买:
操作刚好相反

策略最大的风险就是单边行情, 价格波动超出网格范围.

网格带有自动止损和移动功能

策略源码
JavaScript
// Grid can customize direction
// Basic trading operation: buy first and then sell.
// The grid will start to send buying order at the price that below the first price, which is the price follow 
// by the first price (second latest buying price, third latest buying price…and so on). Each buying order is separated by
// the "price interval" parameter. The number of pending orders is "single quantity", and will send the order total until
// the "total quantity" is filled.
// After any buying order is completed, the program will be on the basis of the buying price, add the price of the "price
// difference" parameter to the sell price, after the order has been sold, and then re-start the progress of this 
// grid strategy (checking, place order, wait until it executed, sell)
// Selling short first and then buy to cover: the operation is just the opposite
// The biggest risk of this strategy is when the market trend is unilateral moving, and the price fluctuations are exceeding the grid.
// The following code has made the grid with automatic stop loss and movement function.
策略参数
策略参数
网格方向
首价格自动
首价格
总数量
价格间隔
价差(元)
订单大小
单笔数量
买单大小
卖单大小
量差
量小数点最长位数
开启价差保护
入市价差保护
停止时取消所有挂单
轮询间隔
失败重试间隔
恢复上次盈利
上次盈利
上次盈利算入均价
启用资金检验
开启止损
最大浮动亏损(元)
止损后操作
开启止盈
最大浮动盈利(元)
止盈后操作
自动移动
最大距离(元)
最大空闲(秒)
开启动态挂单
订单失效距离(元)
启动时清空所有数据
价格小数位长度
下单量小数位长度
最小交易量
可用指令
停止并平衡到初始状态
收网
评论
全部评论 (0)
暂无数据
暂无数据
  • 1
社区
回测系统
APP 下载
iPhone 下载
© 2015 - ∞ INVENTOR PTE LTD (SG)