-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Support take profit order same as "stoploss_on_exchange" on Binance #7499
Comments
While i'll mark this as enhancement - it'll probably stay in this state for quite a long time (we have enhancement issues that are 4 years and older ...) - as this will require quite some heavy changes to internal workings - and is currently not something we're actively working on. |
The tested workaround can be found here: |
Your workaround may be tested in a standalone context - but it's not working in a freqtrade context. |
Quick update on the subject, I saw that CCXT now support TP/SL order. you can see that here |
@Axel-CH ccxt was never the blocking point for this, and it's not the case now either. Depending on the exchange, supporting both a TP/SL order will result in either one (binnace OCO) or 2 orderid's (almost all other exchanges) that need to be tracked. A first step can be the removal of all "open_order_id" occurances by iterating over a (to define) property of "open orders" for that trade object, using the orders we track in the database. I'm happy for you to work on it - but i'll not be accepting a "big bang" PR that's trying to introduce OCO / take profit/stoploss orders. It'll be a work in steps (probably over months, as i expect each step to take time to test, as well as "settle" to iron out further bugs), where the first step is removal of Once that part is merged, we can discuss about how to progress further - but i do see that as the basis for all further discussions around how an interface for this could look like. |
@xmatthias What will be the next step? |
well do the same for stoploss_order_id (which should be simpler i assume - but didn't check). |
From what I understood about this issue, the feature that we worked on (#8779) and that was merged is covering what was requested. I will do more live tests today but in my opinion we can close this |
well no - #8779 was a prerequisite to support this, as is the replacement / removal of this might've been a misunderstanding or has been forgotten, but was clearly stated in #7499 (comment) - as well as in #8779 (comment) |
My bad, I was refering to taking profit partially in "adjust_trade_position" context. I think it is working there, will try |
using adjust-trade-position for taking partial profit is working (and was working) since this callback was introduced (or support for exiting was added, anyway). |
What about setting |
i do struggle to see the connection to this issue at the moment. It will increase responsiveness (and traffic / potential ratelimit problems) - however - it's not that you set it to 1s and are guaranteed 1s - it's the minimum you set and if the cycle takes less then this, it'll wait for this time. |
Describe your environment
Describe the problem
In some cases, bots may miss take profit target if prices spike or drop in very short period, 1s or 2s, shorter than default
process_throttle_secs: 5
, this problem could be avoided iftake profit
order could be set asstoploss_on_exchange
order.Describe the enhancement
Binance futures support three kinds of TP and SL orders
trigger price + limit price
trigger price + market price
position TP/SL
Support take profit order same as the
stoploss
order on Binance. 😄The text was updated successfully, but these errors were encountered: