mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-19 11:22:06 +08:00
Fixed issue with spot price on Bittrex
This commit is contained in:
@@ -22,7 +22,7 @@ def initialize(context):
|
||||
|
||||
context.TARGET_POSITIONS = 5000
|
||||
context.PROFIT_TARGET = 0.1
|
||||
context.SLIPPAGE_ALLOWED = 0.02
|
||||
context.SLIPPAGE_ALLOWED = 0.05
|
||||
|
||||
context.retry_check_open_orders = 10
|
||||
context.retry_update_portfolio = 10
|
||||
|
||||
@@ -69,7 +69,7 @@ class ExchangeTradingAlgorithm(TradingAlgorithm):
|
||||
self.stats_minutes = 5
|
||||
|
||||
super(self.__class__, self).__init__(*args, **kwargs)
|
||||
self._create_minute_writer()
|
||||
# self._create_minute_writer()
|
||||
|
||||
signal.signal(signal.SIGINT, self.signal_handler)
|
||||
|
||||
|
||||
@@ -25,6 +25,9 @@ class Bittrex(Exchange):
|
||||
self.base_currency = base_currency
|
||||
self._portfolio = portfolio
|
||||
|
||||
self.minute_writer=None
|
||||
self.minute_reader=None
|
||||
|
||||
self.assets = dict()
|
||||
self.load_assets()
|
||||
|
||||
@@ -257,7 +260,7 @@ class Bittrex(Exchange):
|
||||
|
||||
ordered_candles = list(reversed(candles))
|
||||
if bar_count is None:
|
||||
ohlc_map[asset] = ohlc_from_candle(ordered_candles[-1])
|
||||
ohlc_map[asset] = ohlc_from_candle(ordered_candles[0])
|
||||
else:
|
||||
ohlc_bars = []
|
||||
for candle in ordered_candles[:bar_count]:
|
||||
|
||||
Reference in New Issue
Block a user