BUG: reverts changed introduced in 00f232e2d7

This commit is contained in:
Victor Grau Serrat
2018-02-22 22:09:51 -07:00
parent b4bd557273
commit 388535b09c
+14 -25
View File
@@ -19,8 +19,8 @@ def initialize(context):
def handle_data(context, data):
# define the windows for the moving averages
short_window = 2
long_window = 5
short_window = 50
long_window = 200
# Skip as many bars as long_window to properly compute the average
context.i += 1
@@ -149,27 +149,16 @@ def analyze(context, perf):
if __name__ == '__main__':
run_algorithm(
capital_base=1000,
data_frequency='minute',
initialize=initialize,
handle_data=handle_data,
analyze=analyze,
exchange_name='bitfinex',
algo_namespace=NAMESPACE,
base_currency='usd',
simulate_orders=True,
live=True,
)
# run_algorithm(
# capital_base=1000,
# data_frequency='minute',
# initialize=initialize,
# handle_data=handle_data,
# analyze=analyze,
# exchange_name='bitfinex',
# algo_namespace=NAMESPACE,
# base_currency='usd',
# start=pd.to_datetime('2017-9-22', utc=True),
# end=pd.to_datetime('2017-9-23', utc=True),
# )
capital_base=1000,
data_frequency='minute',
initialize=initialize,
handle_data=handle_data,
analyze=analyze,
exchange_name='bitfinex',
algo_namespace=NAMESPACE,
base_currency='usd',
start=pd.to_datetime('2017-9-22', utc=True),
end=pd.to_datetime('2017-9-23', utc=True),
)