sell reason -> exit reason
This commit is contained in:
parent
fa1bd269d8
commit
295050b80b
@ -356,7 +356,7 @@ Hence, keep in mind that your performance is an integral mix of all different el
|
|||||||
|
|
||||||
### Sell reasons table
|
### Sell reasons table
|
||||||
|
|
||||||
The 2nd table contains a recap of sell reasons.
|
The 2nd table contains a recap of exit reasons.
|
||||||
This table can tell you which area needs some additional work (e.g. all or many of the `exit_signal` trades are losses, so you should work on improving the sell signal, or consider disabling it).
|
This table can tell you which area needs some additional work (e.g. all or many of the `exit_signal` trades are losses, so you should work on improving the sell signal, or consider disabling it).
|
||||||
|
|
||||||
### Left open trades table
|
### Left open trades table
|
||||||
@ -483,7 +483,7 @@ Since backtesting lacks some detailed information about what happens within a ca
|
|||||||
- sells are never "below the candle", so a ROI of 2% may result in a sell at 2.4% if low was at 2.4% profit
|
- sells are never "below the candle", so a ROI of 2% may result in a sell at 2.4% if low was at 2.4% profit
|
||||||
- Forcesells caused by `<N>=-1` ROI entries use low as sell value, unless N falls on the candle open (e.g. `120: -1` for 1h candles)
|
- Forcesells caused by `<N>=-1` ROI entries use low as sell value, unless N falls on the candle open (e.g. `120: -1` for 1h candles)
|
||||||
- Stoploss sells happen exactly at stoploss price, even if low was lower, but the loss will be `2 * fees` higher than the stoploss price
|
- Stoploss sells happen exactly at stoploss price, even if low was lower, but the loss will be `2 * fees` higher than the stoploss price
|
||||||
- Stoploss is evaluated before ROI within one candle. So you can often see more trades with the `stoploss` sell reason comparing to the results obtained with the same strategy in the Dry Run/Live Trade modes
|
- Stoploss is evaluated before ROI within one candle. So you can often see more trades with the `stoploss` exit reason comparing to the results obtained with the same strategy in the Dry Run/Live Trade modes
|
||||||
- Low happens before high for stoploss, protecting capital first
|
- Low happens before high for stoploss, protecting capital first
|
||||||
- Trailing stoploss
|
- Trailing stoploss
|
||||||
- Trailing Stoploss is only adjusted if it's below the candle's low (otherwise it would be triggered)
|
- Trailing Stoploss is only adjusted if it's below the candle's low (otherwise it would be triggered)
|
||||||
|
@ -3,7 +3,7 @@ from enum import Enum
|
|||||||
|
|
||||||
class ExitType(Enum):
|
class ExitType(Enum):
|
||||||
"""
|
"""
|
||||||
Enum to distinguish between sell reasons
|
Enum to distinguish between exit reasons
|
||||||
"""
|
"""
|
||||||
ROI = "roi"
|
ROI = "roi"
|
||||||
STOP_LOSS = "stop_loss"
|
STOP_LOSS = "stop_loss"
|
||||||
|
@ -1145,7 +1145,7 @@ class Trade(_DECL_BASE, LocalTrade):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def get_exit_reason_performance(pair: Optional[str]) -> List[Dict[str, Any]]:
|
def get_exit_reason_performance(pair: Optional[str]) -> List[Dict[str, Any]]:
|
||||||
"""
|
"""
|
||||||
Returns List of dicts containing all Trades, based on sell reason performance
|
Returns List of dicts containing all Trades, based on exit reason performance
|
||||||
Can either be average for all pairs or a specific pair provided
|
Can either be average for all pairs or a specific pair provided
|
||||||
NOTE: Not supported in Backtesting.
|
NOTE: Not supported in Backtesting.
|
||||||
"""
|
"""
|
||||||
|
@ -801,7 +801,7 @@ class RPC:
|
|||||||
|
|
||||||
def _rpc_exit_reason_performance(self, pair: Optional[str]) -> List[Dict[str, Any]]:
|
def _rpc_exit_reason_performance(self, pair: Optional[str]) -> List[Dict[str, Any]]:
|
||||||
"""
|
"""
|
||||||
Handler for sell reason performance.
|
Handler for exit reason performance.
|
||||||
Shows a performance statistic from finished trades
|
Shows a performance statistic from finished trades
|
||||||
"""
|
"""
|
||||||
return Trade.get_exit_reason_performance(pair)
|
return Trade.get_exit_reason_performance(pair)
|
||||||
|
@ -1305,8 +1305,8 @@ class Telegram(RPCHandler):
|
|||||||
" `pending buy orders are marked with an asterisk (*)`\n"
|
" `pending buy orders are marked with an asterisk (*)`\n"
|
||||||
" `pending sell orders are marked with a double asterisk (**)`\n"
|
" `pending sell orders are marked with a double asterisk (**)`\n"
|
||||||
"*/buys <pair|none>:* `Shows the enter_tag performance`\n"
|
"*/buys <pair|none>:* `Shows the enter_tag performance`\n"
|
||||||
"*/sells <pair|none>:* `Shows the sell reason performance`\n"
|
"*/sells <pair|none>:* `Shows the exit reason performance`\n"
|
||||||
"*/mix_tags <pair|none>:* `Shows combined buy tag + sell reason performance`\n"
|
"*/mix_tags <pair|none>:* `Shows combined buy tag + exit reason performance`\n"
|
||||||
"*/trades [limit]:* `Lists last closed trades (limited to 10 by default)`\n"
|
"*/trades [limit]:* `Lists last closed trades (limited to 10 by default)`\n"
|
||||||
"*/profit [<n>]:* `Lists cumulative profit from all finished trades, "
|
"*/profit [<n>]:* `Lists cumulative profit from all finished trades, "
|
||||||
"over the last n days`\n"
|
"over the last n days`\n"
|
||||||
|
@ -361,7 +361,7 @@ class IStrategy(ABC, HyperStrategyMixin):
|
|||||||
:param current_rate: Rate, calculated based on pricing settings in ask_strategy.
|
:param current_rate: Rate, calculated based on pricing settings in ask_strategy.
|
||||||
:param current_profit: Current profit (as ratio), calculated based on current_rate.
|
:param current_profit: Current profit (as ratio), calculated based on current_rate.
|
||||||
:param **kwargs: Ensure to keep this here so updates to this won't break your strategy.
|
:param **kwargs: Ensure to keep this here so updates to this won't break your strategy.
|
||||||
:return: To execute exit, return a string with custom sell reason or True. Otherwise return
|
:return: To execute exit, return a string with custom exit reason or True. Otherwise return
|
||||||
None or False.
|
None or False.
|
||||||
"""
|
"""
|
||||||
return None
|
return None
|
||||||
|
@ -72,7 +72,7 @@ def custom_exit(self, pair: str, trade: 'Trade', current_time: 'datetime', curre
|
|||||||
:param current_rate: Rate, calculated based on pricing settings in ask_strategy.
|
:param current_rate: Rate, calculated based on pricing settings in ask_strategy.
|
||||||
:param current_profit: Current profit (as ratio), calculated based on current_rate.
|
:param current_profit: Current profit (as ratio), calculated based on current_rate.
|
||||||
:param **kwargs: Ensure to keep this here so updates to this won't break your strategy.
|
:param **kwargs: Ensure to keep this here so updates to this won't break your strategy.
|
||||||
:return: To execute sell, return a string with custom sell reason or True. Otherwise return
|
:return: To execute sell, return a string with custom exit reason or True. Otherwise return
|
||||||
None or False.
|
None or False.
|
||||||
"""
|
"""
|
||||||
return None
|
return None
|
||||||
|
Loading…
Reference in New Issue
Block a user