-
Beta Was this translation helpful? Give feedback.
Answered by
kernc
May 10, 2021
Replies: 1 comment 1 reply
-
Does it work if you just do: if not self.position and self.predicted_bullish:
self.buy()
elif self.position and self.predicted_bearish:
self.position.close() Or, alternatively: assert self.position.is_long
self.sell(size=self.position) This shouldn't result in any short orders/trades. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
alpozcan
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Does it work if you just do:
Or, alternatively:
This shouldn't result in any short orders/trades.