You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm looking for a way to implement my strategy.
The strategy is the following:
When the cumulative returns is above 0.05 --> buy and hold (unless stop loss kicks in)
`class Buy_when_cumret_above(Strategy):
# set_stop_loss
stop_loss = 5
I'm now getting the following error:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
Is there someone who can help me with implementing my strategy?
Beta Was this translation helpful? Give feedback.
All reactions