Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Assertion Error for negative price values #1149

DukeBot18 started this conversation in Ideas
Discussion options

I am testing on continuous futures contracts and because of that I have negative price values, this is very common. Take a look at HO ticker. I am running into the issue of an assertion error because of my negative values and negative stop loss values associated. This assertion needs to be removed

You must be logged in to vote

Replies: 2 comments

Comment options

This is within the Trade Class under the following method:

 def __set_contingent(self, type, price):
 assert type in ('sl', 'tp')
 assert price is None or 0 < price < np.inf
You must be logged in to vote
0 replies
Comment options

@kernc I have put the fix in my forked branch. I can add this to your repo if wanted

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /