Skip to content

Commit

Permalink
clean code for 2.1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
lin committed Dec 28, 2020
1 parent 94cb7dd commit 8122ade
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
2 changes: 1 addition & 1 deletion howtrader/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2.1.7.9"
__version__ = "2.1.8.0"
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ def __init__(self, cta_engine: CtaEngine, strategy_name, vt_symbol, setting):
self.last_filled_order: Union[OrderData, None] = None # 联合类型, 或者叫可选类型,二选一那种.
self.tick: Union[TickData, None] = None #

print("交易的交易对:", vt_symbol)

def on_init(self):
"""
Callback when strategy is inited.
Expand Down Expand Up @@ -162,17 +160,4 @@ def on_stop_order(self, stop_order: StopOrder):
pass

def get_step(self) -> int:
pos = abs(self.pos)

return 1

# if pos < 3 * self.trading_size:
# return 1
#
# elif pos < 5 * self.trading_size:
# return 2
#
# elif pos < 7 * self.trading_size:
# return 3
#
# return 4

0 comments on commit 8122ade

Please sign in to comment.