Skip to content

No way to disable short-selling ? #353

Answered by kernc
alpozcan asked this question in Q&A
Discussion options

You must be logged in to vote

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.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@alpozcan
Comment options

Answer selected by alpozcan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants