Fixed issue with spot price on Bittrex

This commit is contained in:
fredfortier
2017-09-01 11:17:43 -04:00
parent c1d7022846
commit 8054d1d520
3 changed files with 6 additions and 3 deletions
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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)
+4 -1
View File
@@ -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]: