Skip to content

Commit

Permalink
add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lin committed Dec 28, 2020
1 parent e9d6c1c commit dd5bfbb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ folder by using the multi-threads for speeding.
7. V2.1.7.9 account update interval and binance_spot_grid_strategy
添加资产更新的定时推送和币安现货网格交易的策略。

8. V2.1.8 增加现货和合约网格策略 add spot and future grid strategies


## 联系方式
微信: bitquant51

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,18 @@
from howtrader.trader.object import GridPositionCalculator
from typing import Union

NORMAL_TIMER_INTERVALL = 5
NORMAL_TIMER_INTERVAL = 5
PROFIT_TIMER_INTERVAL = 5
STOP_TIMER_INTERVAL = 60


class SpotProfitGridStrategy(CtaTemplate):
"""
币安现货网格策略,添加止盈止损的功能.
该策略没有止盈止损功能,一直在成交的上下方进行高卖低卖操作, 达到最大的单子数量的时候,会计算仓位均价,然后进行平仓操作.
免责声明: 本策略仅供测试参考,本人不负有任何责任。使用前请熟悉代码。测试其中的bugs, 请清楚里面的功能后再使用。
币安邀请链接: https://www.binancezh.pro/cn/futures/ref/51bitquant
合约邀请码:51bitquant
"""
author = "51bitquant"

Expand Down Expand Up @@ -101,7 +105,7 @@ def process_timer_event(self, event: Event):

self.normal_timer_interval += 1

if self.normal_timer_interval >= NORMAL_TIMER_INTERVALL:
if self.normal_timer_interval >= NORMAL_TIMER_INTERVAL:
self.normal_timer_interval = 0

# 仓位为零的时候
Expand Down

0 comments on commit dd5bfbb

Please sign in to comment.