Coder Social home page Coder Social logo

Comments (4)

froggleston avatar froggleston commented on June 10, 2024 1
  1. A global stoploss of -0.007 is 0.7% relative to trade open. It is a percentage, not a price or "point"-relative value. Similarly, your trailing stoploss percentage values are far too tight for backtesting.
  2. Check the telegram command documentation: https://www.freqtrade.io/en/stable/telegram-usage/#status
  3. This is likely because you have trailing_stop set to True. Please read the documentation as to what this option means.
  4. I'd have to do some checking, but I'm not sure if you can cancel an open limit order through telegram (perhaps forceexit works? I've never tried it with an unfilled order)
  5. No.

from freqtrade.

xmatthias avatar xmatthias commented on June 10, 2024 1

There's no "startup time" for a bot (not unless you do something in your strategy requiring this).

Now i find your stoploss is WAY too tight at 0.7%.
In my experience, anything below 1% is unreliable at very short timeframes - at anything >= 5m - you'll want to work with 2-3% minimum.

The minimum asset tick size will also play a part in this - especially at values this low (you can't have a stop lower than the tick size - it'll always round up (the alternative would be an automatic exit at entry rate).

Your stop processing is then further constraint by the frequency of the bot checking on each pair (this is by default 5s - which is however a minimum. Ech additional open trade adds to this time - if you have open orders, the time will probably be lengthened (it's active calls against the exchange).
Essentially, this means that the price for each pair might be checked every 5 seconds - or more - so if we're at 20s - then the bot will be blind for all movements in between.

that's however not always relevant - as on this pair - 1 order of 1000$ can move price by several ticks - so even one second can make a difference - which is why i don't think a stoploss of <1.5-2% is realistic on such low-volume/value pairs

That particular pair also seems to have a fairly light orderbook (an order of a few $ can push price by mutiple orderbook steps - this is also something that's considered for market orders).

In summary: a stop will try to protect your loss - but there's no guarantee that it fills (if it's a limit order) - or at what price it fills (if it's a stop order).

  1. you can use /status to get all open trades.

  2. looks correct - it's a trailing stop - it started trailing - hence the "stop" price is above (or in case of a short below) the entry price (the order also exited at a win).
    With these trailing settings though - you'll have most trades exit at 0.01% profit (so nothing) - as a move of 0.01% to the downside from it's high will trigger stop.
    Stoploss on exchange in such a situations will fail probably 50% of the time (fail to be placed as "current price" is below the expected trigger price, resulting in an emergency exit).

  3. use the check_*_timeout() helpers

  4. no. Orders not opened by freqtrade will not be considered. Also for futures, we assume that freqtrade "owns" the whole (sub-)account - so manually opening and closing orders nearby can mess with some calculations (mainly for stake size) - and should be considered a non-supported setup.

edit i assume bp assumes to [Basis point](https://www.investopedia.com/ask/answers/what-basis-point-bps/#:~:text=a%20financial%20instrument.-,One%20basis%20point%20is%20equivalent%20to%200.01%25%20(1%2F100th,basis%20points%20number%20by%20100.) - which is 0.01% - and would align with your settings.

from freqtrade.

zhaohui-yang avatar zhaohui-yang commented on June 10, 2024

Thanks for the detailed comments! @xmatthias @froggleston . Let me check the documentation again! I am still confused about the prices of some stop-loss orders.

Also, is there any relevant configuration that can make the open rate in telegram display more decimal point precision? For some trading pairs, the decimal does not seem to be sufficient. For example,

✓ Binance (dry): New Trade filled (#4398)
Pair: 1000PEPE/USDT:USDT
Candle OHLC: 0.0072913, 0.007325, 0.0072744, 0.0073153
Amount: 226035
Direction: Short (5x)
Open Rate: 0.007 USDT
Total: 331.752 USDT / 331.405 USD

And, yes, bp is basis point, 1 bp = 0.01%, 20 bps = 0.2%.

In the process of optimizing some hyperparameters, the decimal point precision control method is usually used. I would like to ask if there are some control methods similar to step size, such as stoploss = DecimalParameter(0.01, 0.05, step=0.0020) and it will enumerate something like 0.0100, 0.0120, 0.0140 ... 0.0480, 0.0500. In this way, the step size is 20bps for the stoploss optimization. Below is the standard optimization parameter definition in the documentation.

class MyAwesomeStrategy(IStrategy):
    buy_adx = DecimalParameter(20, 40, decimals=1, default=30.1, space="buy")
    buy_rsi = IntParameter(20, 40, default=30, space="buy")
    buy_adx_enabled = BooleanParameter(default=True, space="buy")
    buy_rsi_enabled = CategoricalParameter([True, False], default=False, space="buy")
    buy_trigger = CategoricalParameter(["bb_lower", "macd_cross_signal"], default="bb_lower", space="buy")

from freqtrade.

xmatthias avatar xmatthias commented on June 10, 2024

In the process of optimizing some hyperparameters, the decimal point precision control method is usually used. I would like to ask if there are some control methods similar to step size

you can implement this logic quite easily by doing the math in the strategy.

Also, is there any relevant configuration that can make the open rate in telegram display more decimal point precision? For some trading pairs, the decimal does not seem to be sufficient.

No - shown decimals are taken from the price precision given for each pair - or in case of quote currency values - from static values defined for that asset (3 decimals for USDT, 8 for BTC, ...).

from freqtrade.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.