Skip to content
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

Roi Limit TP Orders #8036

Closed
kryzhikov opened this issue Jan 19, 2023 · 1 comment
Closed

Roi Limit TP Orders #8036

kryzhikov opened this issue Jan 19, 2023 · 1 comment
Labels
Question Questions - will be closed after some period of inactivity. Strategy assistance Help with a strategy

Comments

@kryzhikov
Copy link

Describe your environment

  • Operating system: Docker
  • Python Version: 3.10.7 (python -V)
  • CCXT version: ccxt==2.6.26 (pip freeze | grep ccxt)
  • Freqtrade Version: freqtrade 2022.12 (freqtrade -V or docker compose run --rm freqtrade -V for Freqtrade running in docker)

Your question

Is it any way to Set Limit TP Orders based on ROI?

What I want to do is based on roi (e.g.):
"0": 0.067,
"6": 0.032,
"9": 0.01,
"17": 0.006,
"39": 0

I want the bot not to open limit order when 6.7% reached, but open limit TP order when trades is opened to 6.7%, then after 6 mins open limit tp order on 3.2% change and so on.

What is the best way to do this in freqtrade?

@kryzhikov kryzhikov added the Question Questions - will be closed after some period of inactivity. label Jan 19, 2023
@xmatthias
Copy link
Member

on-exchange take profit orders are currently not supported (and likely won't be for quite some time).
Best subscribe to #7499 for updates on this.

Freqtrade will track ROI (and stoploss) interactively - and will then open the order according to the parameters set - once the limit is crossed.
Stoploss on exchange is placed immediately if available - but if it's not (or there's no on-exchange stop available for your exchange), then it'll work identical to ROI.
There's no corresponding method available for take profit at this point.

You can probably work around this by creating an exit signal "all the time" (custom_exit callback - return True) - and then use custom_exit_price() and timeout callbacks to manage order placement and cancellation yourself.

I'd however strongly advise against this (and we'll also not actively support this).
Having an open exit order will effectively disable all other trade "checks" - which means you'll no longer have stoploss checking (though you can probably do that somehow through a combination of callbacks in the strategy - it's probably error-prone and difficult to test).
it'll also disable stoploss on exchange (most exchanges don't allow you to tie up the same capital twice) - but i guess you're aware of that already.

@xmatthias xmatthias added the Strategy assistance Help with a strategy label Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question Questions - will be closed after some period of inactivity. Strategy assistance Help with a strategy
Projects
None yet
Development

No branches or pull requests

2 participants