From dd5bfbbfd0083234eef8efc02b085ef39f553580 Mon Sep 17 00:00:00 2001 From: lin Date: Mon, 28 Dec 2020 11:08:06 +0800 Subject: [PATCH] add docs --- README.md | 3 +++ .../cta_strategy/strategies/spot_profit_grid_strategy.py | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4ddcbe1..87f6f0d 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/howtrader/app/cta_strategy/strategies/spot_profit_grid_strategy.py b/howtrader/app/cta_strategy/strategies/spot_profit_grid_strategy.py index 629a210..c5ecf6e 100644 --- a/howtrader/app/cta_strategy/strategies/spot_profit_grid_strategy.py +++ b/howtrader/app/cta_strategy/strategies/spot_profit_grid_strategy.py @@ -14,7 +14,7 @@ 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 @@ -22,6 +22,10 @@ class SpotProfitGridStrategy(CtaTemplate): """ 币安现货网格策略,添加止盈止损的功能. + 该策略没有止盈止损功能,一直在成交的上下方进行高卖低卖操作, 达到最大的单子数量的时候,会计算仓位均价,然后进行平仓操作. + 免责声明: 本策略仅供测试参考,本人不负有任何责任。使用前请熟悉代码。测试其中的bugs, 请清楚里面的功能后再使用。 + 币安邀请链接: https://www.binancezh.pro/cn/futures/ref/51bitquant + 合约邀请码:51bitquant """ author = "51bitquant" @@ -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 # 仓位为零的时候