mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-22 12:40:30 +08:00
BLD: tested stats with multiple assets
This commit is contained in:
@@ -96,13 +96,13 @@ def handle_data(context, data):
|
||||
# Now that we've collected all current data for this frame, we use
|
||||
# the record() method to save it. This data will be available as
|
||||
# a parameter of the analyze() function for further analysis.
|
||||
|
||||
record(
|
||||
volume=(context.market, current['volume']),
|
||||
price_change=(context.market, price_change),
|
||||
rsi=(context.market, rsi[-1]),
|
||||
cash=cash
|
||||
)
|
||||
|
||||
# We are trying to avoid over-trading by limiting our trades to
|
||||
# one per day.
|
||||
if context.traded_today:
|
||||
|
||||
Reference in New Issue
Block a user