New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix/kucoin_perpetual_leverage #6640
Fix/kucoin_perpetual_leverage #6640
Conversation
hi @leastchaos Could you please fix unit-tests? |
I think this is another bug in the perpetual_market_making strategy...
set leverage will only be activated only when market is ready.
you can add this 2 line to the strategy to ensure that the leverage is set by the strategy to test. |
Thanks for the fix on perpetual market making strategy @leastchaos, I confirm that it works on #6658. However when I tried to add it here on this PR, im not getting this behavior on the screenshot and does not change the leverage to desired value.
|
@rapcmia i think you can test with this pr directly now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test performed:
- Cloned and installed fix branch
- Manually built docker image successfully
- Created/started perpetualMM using kucoin_perpetual and leverages 3/5/10/15
- Got orders to OPEN filled
- Review stop-loss and take profit works as expected
- Review opened position leverage shows in status
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job @leastchaos ! LGTM
Before submitting this PR, please make sure:
A description of the changes proposed in the pull request:
leverage is set in the place_order and not using risk_level_limit.
risk level limit is an account setting which determine the max leverage for that symbol only.
anything more than 8 will result in leverage always be stuck at one as it will always fail and will also result in max leverage setting changed to lower than current leverage.
Tests performed by the developer:
Tips for QA testing: