Giter Site home page Giter Site logo

Comments (6)

xmatthias avatar xmatthias commented on June 8, 2024 1

First of all - that log shows is that your telegram configuration is wrong / faulty.

You're also (completely) misconfiguring "stoploss_on_exchange_limit_ratio" with 0.03.

You're essentially saying (with simplified numbers):

  • my stop price is at 100$ (when price falls below this - trigger the stop, creating a limit order).
  • Place the limit order at 3$ (97% below the stop price).

Now in your terms:
trigger stop at 7.21$
the (triggered) limit order should have a price of 0.217 - which is outside of the range for prices the exchange allows.

For "stoploss_on_exchange_limit_ratio" - the recommendation is to leave it as is (0.99 - 1% below the stop price) - unless you have very good reason to configure this differently (which i doubt you do have).
How stoploss_on_exchange_limit_ratio is actually applied is quite well explained in the calculation sample in the docs.

from freqtrade.

xmatthias avatar xmatthias commented on June 8, 2024

Please get used to filling out the issue template. Those who frequently omit the template may have their issues closed without comment.
We're asking some very basic questions - by deleting the issue template, you're explicitly choosing not to answer our questions.

Filling out the template helps reduce our workload, and we greatly appreciate that.

In this particular case - help without it will not be provided.


You're also missing what exchange you're using - so please make sure to include that, too.

from freqtrade.

Freqtrader0306 avatar Freqtrader0306 commented on June 8, 2024

@xmatthias I am truly sorry. I filled out the template, but then encountered issues with formatting. Since I couldn't get it under control, I copied everything into ChatGPT and gave it the task (which it also couldn't manage) to adjust the formatting so that the code is appropriately formatted. In the process, it seems that the template was inadvertently deleted, which I unfortunately didn't even notice. Sorry for that

from freqtrade.

xmatthias avatar xmatthias commented on June 8, 2024

No worries ;) we're kinda used to it - so it's a "quick" template we can respond with.

i don't think it's related to your pair selection (though that can play a role - it'll not matter "that much").

what's your stoploss?
the error kinda suggests that it's very far away (-1?) - which would mean that a stoploss would be placed at a price that's outside of the allowed price range for orders.

To further look at this however, we'll need actual logs (best starting from a few lines before the exception).

you can wrap your code / logs in tripple backtics (```) - so formatting is roughly ok.

from freqtrade.

Freqtrader0306 avatar Freqtrader0306 commented on June 8, 2024

Thank you very much for your help!
My stop loss is: -0.02 (2%)
I'm glad to send you my log containing the error:

2024-04-28 14:36:10 INFO    freqtrade.freqtradebot - Found open order for Trade(id=84, pair=NEAR/USDT, amount=20.38874541, is_short=False, leverage=1.0, open_rate=7.35700000, open_since=2024-04-28 14:30:10)
2024-04-28 14:36:15 INFO    freqtrade.freqtradebot - Found open order for Trade(id=84, pair=NEAR/USDT, amount=20.38874541, is_short=False, leverage=1.0, open_rate=7.35700000, open_since=2024-04-28 14:30:10)
2024-04-28 14:36:20 INFO    freqtrade.freqtradebot - Found open order for Trade(id=84, pair=NEAR/USDT, amount=20.38874541, is_short=False, leverage=1.0, open_rate=7.35700000, open_since=2024-04-28 14:30:10)
2024-04-28 14:36:25 INFO    freqtrade.freqtradebot - Found open order for Trade(id=84, pair=NEAR/USDT, amount=20.38874541, is_short=False, leverage=1.0, open_rate=7.35700000, open_since=2024-04-28 14:30:10)
2024-04-28 14:36:30 INFO    freqtrade.freqtradebot - Found open order for Trade(id=84, pair=NEAR/USDT, amount=20.38874541, is_short=False, leverage=1.0, open_rate=7.35700000, open_since=2024-04-28 14:30:10)
2024-04-28 14:36:35 INFO    freqtrade.freqtradebot - Found open order for Trade(id=84, pair=NEAR/USDT, amount=20.38874541, is_short=False, leverage=1.0, open_rate=7.35700000, open_since=2024-04-28 14:30:10)
2024-04-28 14:36:36 INFO    freqtrade.wallets - Wallets synced.
2024-04-28 14:36:36 INFO    freqtrade.freqtradebot - Applying fee on amount for Trade(id=84, pair=NEAR/USDT, amount=20.38874541, is_short=False, leverage=1.0, open_rate=7.35700000, open_since=2024-04-28 14:30:10), fee=0.0203.
2024-04-28 14:36:36 INFO    freqtrade.persistence.trade_model - Updating trade (id=84) ...
2024-04-28 14:36:36 INFO    freqtrade.persistence.trade_model - LIMIT_BUY has been fulfilled for Trade(id=84, pair=NEAR/USDT, amount=20.27970000, is_short=False, leverage=1.0, open_rate=7.35700000, open_since=2024-04-28 14:30:10).
2024-04-28 14:36:36 INFO    freqtrade.wallets - Wallets synced.
2024-04-28 14:36:37 INFO    freqtrade.rpc.rpc_manager - Sending rpc message: {'trade_id': 84, 'type': entry_fill, 'buy_tag': '', 'enter_tag': '', 'exchange': 'Binance', 'pair': 'NEAR/USDT', 'leverage': 1.0, 'direction': 'Long', 'limit': 7.357, 'open_rate': 7.357, 'order_type': 'limit', 'stake_amount': 149.1977529, 'stake_currency': 'USDT', 'base_currency': 'NEAR', 'quote_currency': 'USDT', 'fiat_currency': 'USD', 'amount': 20.279700000000002, 'open_date': datetime.datetime(2024, 4, 28, 14, 30, 10, 1161, tzinfo=datetime.timezone.utc), 'current_rate': 7.358, 'sub_trade': True}
2024-04-28 14:36:37 INFO    freqtrade.rpc.telegram - Notification 'entry_fill' not sent.
2024-04-28 14:36:37 ERROR   freqtrade.freqtradebot - Unable to place a stoploss order on exchange. Could not create stop_loss_limit sell order on market NEAR/USDT. Tried to sell amount 20.2 at rate 0.217 with stop-price 7.21. Message: binance {"code":-1013,"msg":"Filter failure: PERCENT_PRICE_BY_SIDE"}
2024-04-28 14:36:37 WARNING freqtrade.freqtradebot - Exiting the trade forcefully
2024-04-28 14:36:38 INFO    freqtrade.wallets - Wallets synced.
2024-04-28 14:36:38 INFO    freqtrade.rpc.rpc_manager - Sending rpc message: {'type': exit, 'trade_id': 84, 'exchange': 'Binance', 'pair': 'NEAR/USDT', 'leverage': 1.0, 'direction': 'Long', 'gain': 'loss', 'limit': 7.21, 'order_rate': 7.21, 'order_type': 'market', 'amount': 20.2, 'open_rate': 7.357, 'close_rate': 7.21, 'current_rate': 7.378, 'profit_amount': -3.2636534, 'profit_ratio': -0.02193905, 'buy_tag': '', 'enter_tag': '', 'exit_reason': 'emergency_exit', 'open_date': datetime.datetime(2024, 4, 28, 14, 30, 10, 1161, tzinfo=datetime.timezone.utc), 'close_date': datetime.datetime(2024, 4, 28, 14, 36, 38, 859839, tzinfo=datetime.timezone.utc), 'stake_amount': 149.1977529, 'stake_currency': 'USDT', 'base_currency': 'NEAR', 'quote_currency': 'USDT', 'fiat_currency': 'USD', 'sub_trade': False, 'cumulative_profit': 0.0, 'final_profit_ratio': None, 'is_final_exit': False}
2024-04-28 14:36:38 INFO    freqtrade.freqtradebot - Found open order for Trade(id=84, pair=NEAR/USDT, amount=20.20000000, is_short=False, leverage=1.0, open_rate=7.35700000, open_since=2024-04-28 14:30:10)
2024-04-28 14:36:38 INFO    freqtrade.freqtradebot - Fee for Trade Trade(id=84, pair=NEAR/USDT, amount=20.20000000, is_short=False, leverage=1.0, open_rate=7.35700000, open_since=2024-04-28 14:30:10) [sell]: 0.1484498 USDT - rate: 0.001
2024-04-28 14:36:38 INFO    freqtrade.persistence.trade_model - Updating trade (id=84) ...
2024-04-28 14:36:38 INFO    freqtrade.persistence.trade_model - MARKET_SELL has been fulfilled for Trade(id=84, pair=NEAR/USDT, amount=20.20000000, is_short=False, leverage=1.0, open_rate=7.35700000, open_since=2024-04-28 14:30:10).
2024-04-28 14:36:38 INFO    freqtrade.persistence.trade_model - Marking Trade(id=84, pair=NEAR/USDT, amount=20.20000000, is_short=False, leverage=1.0, open_rate=7.35700000, open_since=closed) as closed as the trade is fulfilled and found no open orders for it.
2024-04-28 14:36:39 WARNING freqtrade.rpc.telegram - Telegram NetworkError: Chat not found! Trying one more time.
2024-04-28 14:36:39 WARNING freqtrade.rpc.telegram - TelegramError: Chat not found! Giving up on that message.
2024-04-28 14:36:40 INFO    freqtrade.wallets - Wallets synced.
2024-04-28 14:36:40 INFO    freqtrade.rpc.rpc_manager - Sending rpc message: {'type': exit_fill, 'trade_id': 84, 'exchange': 'Binance', 'pair': 'NEAR/USDT', 'leverage': 1.0, 'direction': 'Long', 'gain': 'loss', 'limit': 7.349, 'order_rate': 7.349, 'order_type': 'market', 'amount': 20.2, 'open_rate': 7.357, 'close_rate': 7.349, 'current_rate': None, 'profit_amount': -0.4586612, 'profit_ratio': -0.00308323, 'buy_tag': '', 'enter_tag': '', 'exit_reason': 'emergency_exit', 'open_date': datetime.datetime(2024, 4, 28, 14, 30, 10, 1161, tzinfo=datetime.timezone.utc), 'close_date': datetime.datetime(2024, 4, 28, 14, 36, 38, 732000, tzinfo=datetime.timezone.utc), 'stake_amount': 149.1977529, 'stake_currency': 'USDT', 'base_currency': 'NEAR', 'quote_currency': 'USDT', 'fiat_currency': 'USD', 'sub_trade': False, 'cumulative_profit': -0.4586612, 'final_profit_ratio': -0.0030711119175508505, 'is_final_exit': True}
2024-04-28 14:36:40 WARNING freqtrade.rpc.telegram - Telegram NetworkError: Chat not found! Trying one more time.
2024-04-28 14:36:40 WARNING freqtrade.rpc.telegram - TelegramError: Chat not found! Giving up on that message.
2024-04-28 14:36:40 INFO    freqtrade.freqtradebot - Pair NEAR/USDT * is locked until 2024-04-28 15:00:00 due to Auto lock.
2024-04-28 14:37:10 INFO    freqtrade.worker - Bot heartbeat. PID=1, version='docker-2024.4-dev-365b9c9c', state='RUNNING'
2024-04-28 14:38:10 INFO    freqtrade.worker - Bot heartbeat. PID=1, version='docker-2024.4-dev-365b9c9c', state='RUNNING'
2024-04-28 14:39:10 INFO    freqtrade.worker - Bot heartbeat. PID=1, version='docker-2024.4-dev-365b9c9c', state='RUNNING'
2024-04-28 14:40:10 INFO    freqtrade.worker - Bot heartbeat. PID=1, version='docker-2024.4-dev-365b9c9c', state='RUNNING'
2024-04-28 14:41:10 INFO    freqtrade.worker - Bot heartbeat. PID=1, version='docker-2024.4-dev-365b9c9c', state='RUNNING'
2024-04-28 14:41:15 INFO    freqtrade.rpc.rpc_manager - Sending rpc message: {'type': status, 'status': 'reload_config'}
2024-04-28 14:41:15 INFO    freqtrade.worker - Changing state from RUNNING to: RELOAD_CONFIG
2024-04-28 14:41:15 INFO    freqtrade.worker - Bot heartbeat. PID=1, version='docker-2024.4-dev-365b9c9c', state='RELOAD_CONFIG'
2024-04-28 14:41:15 INFO    freqtrade.freqtradebot - Cleaning up modules ...
2024-04-28 14:41:15 INFO    freqtrade.rpc.rpc_manager - Cleaning up rpc modules ...
2024-04-28 14:41:15 INFO    freqtrade.rpc.rpc_manager - Cleaning up rpc.apiserver ...
2024-04-28 14:41:15 INFO    freqtrade.rpc.api_server.webserver - Stopping API Server
2024-04-28 14:41:15 INFO    uvicorn.error - Shutting down
2024-04-28 14:41:15 INFO    uvicorn.error - connection closed
2024-04-28 14:41:15 INFO    uvicorn.error - connection closed
2024-04-28 14:41:15 INFO    freqtrade.rpc.api_server.ws.channel - Disconnected from channel - WebSocketChannel(07bad4d8, ('192.168.192.1', 51790))
2024-04-28 14:41:15 INFO    freqtrade.rpc.api_server.ws.channel - Disconnected from channel - WebSocketChannel(cbc0bb02, ('192.168.192.1', 51794))
2024-04-28 14:41:15 WARNING freqtrade.rpc.telegram - Telegram NetworkError: Chat not found! Trying one more time.
2024-04-28 14:41:15 INFO    uvicorn.error - Waiting for application shutdown.
2024-04-28 14:41:15 INFO    uvicorn.error - Application shutdown complete.
2024-04-28 14:41:15 INFO    uvicorn.error - Finished server process [1]
2024-04-28 14:41:15 INFO    freqtrade.rpc.rpc_manager - Cleaning up rpc.telegram ...
2024-04-28 14:41:15 WARNING freqtrade.rpc.telegram - TelegramError: Chat not found! Giving up on that message.
2024-04-28 14:41:15 INFO    telegram.ext.Application - Application is stopping. This might take a moment.
2024-04-28 14:41:15 INFO    telegram.ext.Application - Application.stop() complete
2024-04-28 14:41:25 INFO    freqtrade.configuration.load_config - Using config: /freqtrade/user_data/config.Low_BB_live.json ...
2024-04-28 14:41:25 INFO    freqtrade.loggers - Verbosity set to 0
2024-04-28 14:41:25 INFO    freqtrade.configuration.configuration - Runmode set to live.
2024-04-28 14:41:25 INFO    freqtrade.configuration.configuration - Parameter --db-url detected ...
2024-04-28 14:41:25 WARNING freqtrade.configuration.configuration - `force_entry_enable` RPC message enabled.
2024-04-28 14:41:25 INFO    freqtrade.configuration.configuration - Dry run is disabled
2024-04-28 14:41:25 INFO    freqtrade.configuration.configuration - Using DB: "sqlite:////freqtrade/user_data/tradesv3_live.sqlite"
2024-04-28 14:41:25 INFO    freqtrade.configuration.configuration - Using max_open_trades: 2 ...
2024-04-28 14:41:25 INFO    freqtrade.configuration.configuration - Using user-data directory: /freqtrade/user_data ...
2024-04-28 14:41:25 INFO    freqtrade.configuration.configuration - Using data directory: /freqtrade/user_data/data/binance ...
2024-04-28 14:41:25 INFO    freqtrade.exchange.check_exchange - Checking exchange...
2024-04-28 14:41:25 INFO    freqtrade.exchange.check_exchange - Exchange "binance" is officially supported by the Freqtrade development team.
2024-04-28 14:41:25 INFO    freqtrade.configuration.configuration - Using pairlist from configuration.
2024-04-28 14:41:25 INFO    freqtrade.resolvers.iresolver - Using resolved strategy Low_BB_live from '/freqtrade/user_data/strategies/Low_BB_live.py'...
2024-04-28 14:41:25 INFO    freqtrade.strategy.hyper - Found no parameter file.
2024-04-28 14:41:25 WARNING freqtrade.resolvers.strategy_resolver - DEPRECATED: Using 'use_sell_signal' moved to 'use_exit_signal'.
2024-04-28 14:41:25 WARNING freqtrade.resolvers.strategy_resolver - DEPRECATED: Using 'ignore_roi_if_buy_signal' moved to 'ignore_roi_if_entry_signal'.
2024-04-28 14:41:25 INFO    freqtrade.resolvers.strategy_resolver - Override strategy 'order_types' with value in config file: {'entry': 'limit', 'exit': 'limit', 'emergency_exit': 'market', 'stoploss': 'market', 'stoploss_on_exchange': True, 'stoploss_on_exchange_interval': 60, 'stoploss_on_exchange_limit_ratio': 0.03}.
2024-04-28 14:41:25 INFO    freqtrade.resolvers.strategy_resolver - Override strategy 'stake_currency' with value in config file: USDT.
2024-04-28 14:41:25 INFO    freqtrade.resolvers.strategy_resolver - Override strategy 'stake_amount' with value in config file: 150.
2024-04-28 14:41:25 INFO    freqtrade.resolvers.strategy_resolver - Override strategy 'unfilledtimeout' with value in config file: {'entry': 10, 'exit': 10, 'exit_timeout_count': 0, 'unit': 'minutes'}.
2024-04-28 14:41:25 INFO    freqtrade.resolvers.strategy_resolver - Override strategy 'max_open_trades' with value in config file: 2.
2024-04-28 14:41:25 INFO    freqtrade.resolvers.strategy_resolver - Strategy using minimal_roi: {}
2024-04-28 14:41:25 INFO    freqtrade.resolvers.strategy_resolver - Strategy using timeframe: 30m
2024-04-28 14:41:25 INFO    freqtrade.resolvers.strategy_resolver - Strategy using stoploss: -0.02
2024-04-28 14:41:25 INFO    freqtrade.resolvers.strategy_resolver - Strategy using trailing_stop: False
2024-04-28 14:41:25 INFO    freqtrade.resolvers.strategy_resolver - Strategy using trailing_stop_positive_offset: 0.0
2024-04-28 14:41:25 INFO    freqtrade.resolvers.strategy_resolver - Strategy using trailing_only_offset_is_reached: False
2024-04-28 14:41:25 INFO    freqtrade.resolvers.strategy_resolver - Strategy using use_custom_stoploss: False
2024-04-28 14:41:25 INFO    freqtrade.resolvers.strategy_resolver - Strategy using process_only_new_candles: True
2024-04-28 14:41:25 INFO    freqtrade.resolvers.strategy_resolver - Strategy using order_types: {'entry': 'limit', 'exit': 'limit', 'emergency_exit': 'market', 'stoploss': 'market', 'stoploss_on_exchange': True, 'stoploss_on_exchange_interval': 60, 'stoploss_on_exchange_limit_ratio': 0.03}
2024-04-28 14:41:25 INFO    freqtrade.resolvers.strategy_resolver - Strategy using order_time_in_force: {'entry': 'GTC', 'exit': 'GTC'}
2024-04-28 14:41:25 INFO    freqtrade.resolvers.strategy_resolver - Strategy using stake_currency: USDT
2024-04-28 14:41:25 INFO    freqtrade.resolvers.strategy_resolver - Strategy using stake_amount: 150
2024-04-28 14:41:25 INFO    freqtrade.resolvers.strategy_resolver - Strategy using protections: []
2024-04-28 14:41:25 INFO    freqtrade.resolvers.strategy_resolver - Strategy using startup_candle_count: 0
2024-04-28 14:41:25 INFO    freqtrade.resolvers.strategy_resolver - Strategy using unfilledtimeout: {'entry': 10, 'exit': 10, 'exit_timeout_count': 0, 'unit': 'minutes'}
2024-04-28 14:41:25 INFO    freqtrade.resolvers.strategy_resolver - Strategy using use_exit_signal: True
2024-04-28 14:41:25 INFO    freqtrade.resolvers.strategy_resolver - Strategy using exit_profit_only: False
2024-04-28 14:41:25 INFO    freqtrade.resolvers.strategy_resolver - Strategy using ignore_roi_if_entry_signal: True
2024-04-28 14:41:25 INFO    freqtrade.resolvers.strategy_resolver - Strategy using exit_profit_offset: 0.0
2024-04-28 14:41:25 INFO    freqtrade.resolvers.strategy_resolver - Strategy using disable_dataframe_checks: False
2024-04-28 14:41:25 INFO    freqtrade.resolvers.strategy_resolver - Strategy using ignore_buying_expired_candle_after: 0
2024-04-28 14:41:25 INFO    freqtrade.resolvers.strategy_resolver - Strategy using position_adjustment_enable: False
2024-04-28 14:41:25 INFO    freqtrade.resolvers.strategy_resolver - Strategy using max_entry_position_adjustment: -1
2024-04-28 14:41:25 INFO    freqtrade.resolvers.strategy_resolver - Strategy using max_open_trades: 2
2024-04-28 14:41:25 INFO    freqtrade.configuration.config_validation - Validating configuration ...
2024-04-28 14:41:25 INFO    freqtrade.exchange.exchange - Using CCXT 4.3.4
2024-04-28 14:41:25 INFO    freqtrade.exchange.exchange - Using Exchange "Binance"
2024-04-28 14:41:34 INFO    freqtrade.resolvers.exchange_resolver - Using resolved exchange 'Binance'...
2024-04-28 14:41:34 INFO    freqtrade.wallets - Wallets synced.

from freqtrade.

Freqtrader0306 avatar Freqtrader0306 commented on June 8, 2024

Dear Matthias,

Thank you very much for your support. I actually made a mistake in my thinking and was able to solve the problem thanks to your tip. :-)

Best regards,
Patrik

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.