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
dru-run mode profit falls below the stoploss a lot, and how to print all current pending limit orders? #9953
Comments
|
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%. 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). 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).
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. |
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,
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
|
you can implement this logic quite easily by doing the math in the strategy.
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, ...). |
Describe your environment
python -V
)pip freeze | grep ccxt
)freqtrade -V
ordocker compose run --rm freqtrade -V
for Freqtrade running in docker)Your question
Ask the question you have not been able to find an answer in the Documentation
Thank you very much for reading this issue. I have some questions about stop loss.
1. The actual stop loss price exceeds the limit price set by stoploss.
My config is set as below:
In dry-run mode, my trading pairs are DOT/USDT:USDT and etc. The leverage is set to 1.
The following logs are copied from telegram.
In my understanding, the limit stoploss order should be a limit price order. When the price exceeds this order, it will be executed immediately. Then the maximum loss of the transaction should be the handling fee at the time of transaction + a spread ( if market order) + the maximum stoploss cost of 70 bp. I would like to ask why there is a loss of, for example, 3%? In my opinion, trading fee, 4bp + spread + stoploss 70bp should not hit 300bp's lose. I wonder why this happened?
The trades with big losses happened 11 hours ago, which were the begining time of starting the strategy. Not sure if the strategy needs some warnup?
I find the messages of them:
For the FIL/USDT:USDT, the open rate is 10.214, if I use the 70bp stoploss, then the stoploss should be around 10.14, rather than the exit rate of 9.908. As I read the document, the stoploss should be smaller than the currently used by default in the freqtrade system. So I wonder why the exit reason is 'stop_loss' and the exit profit is -3.03%.
As for the YGG/USDT:USDT order, it triggered the trailing stop offset, In this time, I set the trailing stoploss of 1bp, am I missing the trailing stoploss order placed on the market?
Therefore, as for the dry-run and production mode, is the profit result calculated related to the bar data or the latest quote data? or a smaller timeframe, e.g., 5s bar data?
In the backtest mode, the stoploss result seems like below, which is a little larger than the 70bp I set.
2. How to scan and print all pending orders of the current bot?
I want to send all the open orders running by the bot to the telegram, how can I fetch all the pending open orders?
3. Is this order right?
The SOL/USDT:USDT is a short order, however, the stoploss is 175.459, which is lower than the current rate 175.761 and open rate 175.814. Shouldn't the stoploss larger than the current rate for the short order?
4. How to cancel enter long limit order and place enter short limit order
For example, I placed an enter long limit order and it still in an 'open' status, not filled, after analyzing the latest candle, I want to enter short. Then, how can I cancel the enter long limit price order and place a enter short limit price order on the market?
5. Sync orders?
In the production mode running, If I manually send a buy order from the exchange's APP, and it is filled. Will it be synced by the freqtrade bot and set the stoploss order for the manually inserted order?
Many thanks!
The text was updated successfully, but these errors were encountered: