mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-09 13:58:25 +08:00
BUG: reverts changed introduced in 00f232e2d7
This commit is contained in:
@@ -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),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user