I tried the following code for stop loss:
# while e is Equity(11999 [AZPN]) or some other equity amount = 683 sl = 71.176125 algo.order(e, amount) algo.order(e, -amount, stop_price = sl)
I'm getting runtime error at the last row (setting stop loss).
ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all()
Any one has any idea what went wrong?