Skip to content
Discussion options

You must be logged in to vote

Adding to @Di3goCH suggestion, one can also use int(market_price.round(-1)) to round the current market price to the neares ten.

Of cause, if you then calculate some percentage of the price, first calculate the percentage and then round to the closest ten (as otherwise the stop_price would be for example 26530*0.5=13265, which is not a multiple of ten). Instead use: int((market_price*0.5).round(-1))

Replies: 5 comments 9 replies

Comment options

You must be logged in to vote
7 replies
@Di3goCH
Comment options

@CS-MLU
Comment options

@Di3goCH
Comment options

@CS-MLU
Comment options

@Di3goCH
Comment options

Comment options

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

Comment options

You must be logged in to vote
0 replies
Comment options

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

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