BUG: fixed potential issue with refreshing the stats in live mode

This commit is contained in:
Frederic Fortier
2018-01-04 22:46:21 -05:00
parent b4e7629e8b
commit 79e4854973
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -37,7 +37,7 @@ def initialize(context):
context.base_price = None
context.current_day = None
context.RSI_OVERSOLD = 50
context.RSI_OVERSOLD = 55
context.RSI_OVERBOUGHT = 65
context.CANDLE_SIZE = '5T'
@@ -244,7 +244,7 @@ def analyze(context=None, perf=None):
if __name__ == '__main__':
# The execution mode: backtest or live
live = False
live = True
if live:
run_algorithm(
+1 -1
View File
@@ -680,7 +680,7 @@ class ExchangeTradingAlgorithmLive(ExchangeTradingAlgorithmBase):
if new_orders != self._last_orders:
self.performance_needs_update = True
self._last_orders = new_orders
self._last_orders = copy.deepcopy(new_orders)
if self.performance_needs_update:
self.perf_tracker.update_performance()