Type/to search

基础网格交易策略

Cryptocurrency
Created: 2021-09-16 14:54:36
Last modified: 5 years ago
0
Follow
1
Followers

基础网格交易策略实现

目前这个不是最优的版本,我自己目前跑的是币安的websocket版本。
如果大家有需要,我再把币安的websocket版本改成适合在发明者上跑的版本。

Source
Python
'''backtest
start: 2021-08-01 00:00:00
end: 2021-09-01 00:00:00
period: 1m
basePeriod: 1m
exchanges: [{"eid":"Binance","currency":"BTC_USDT","balance":1000000,"stocks":0,"fee":[0.06,0.075]}]
args: [["lower_price",30000],["upper_price",50000],["grid_num",200],["trading_per_grid",0.1]]
'''

grid = dict()
interval = 0
Strategy parameters
Strategy parameters
交易对
区间下限价格
区间上限价格
网格数
每格购买数量
下单价格精度
下单数量精度
Comment
All comments (6)

    老哥,这个怎么不能运行啊?有错误

    4 years ago

    这个可以定制吗

    5 years ago

    。。。ZeroDivisionError: float division by zero
    把网格设置成6可以,为什么做成20都显示错误呢?

    5 years ago

    这个可以用在okex交易所吗

    5 years ago

    可以

    5 years ago

    大家使用后,有什么问题可以及时在下面反馈给我。

    5 years ago
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)