BLD: housekeeping and adjustments

This commit is contained in:
Frederic Fortier
2018-01-18 18:58:14 -05:00
parent 439b5404ae
commit 3a321eb195
3 changed files with 9 additions and 10 deletions
+1 -1
View File
@@ -143,7 +143,7 @@ def analyze(context, stats):
if __name__ == '__main__':
live = False
live = True
if live:
run_algorithm(
capital_base=0.001,
+2 -2
View File
@@ -39,7 +39,7 @@ def initialize(context):
context.RSI_OVERSOLD = 55
context.RSI_OVERBOUGHT = 60
context.CANDLE_SIZE = '5T'
context.CANDLE_SIZE = '15T'
context.start_time = time.time()
@@ -114,7 +114,7 @@ def handle_data(context, data):
# TODO: retest with open orders
# Since we are using limit orders, some orders may not execute immediately
# we wait until all orders are executed before considering more trades.
orders = get_open_orders(context.market)
orders = context.blotter.open_orders
if len(orders) > 0:
log.info('exiting because orders are open: {}'.format(orders))
return