Skip to content

Commit 3ac4a87

Browse files
committed
Merge remote-tracking branch 'origin/develop' into dependabot/pip/develop/ccxt-4.4.85
2 parents b8b94d5 + 9fe361f commit 3ac4a87

File tree

10 files changed

+5145
-4086
lines changed

10 files changed

+5145
-4086
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
python-version: ${{ matrix.python-version }}
3939

4040
- name: Install uv
41-
uses: astral-sh/setup-uv@6b9c6063abd6010835644d4c2e1bef4cf5cd0fca # v6.0.1
41+
uses: astral-sh/setup-uv@f0ec1fc3b38f5e7cd731bb6ce540c5af426746bb # v6.1.0
4242
with:
4343
activate-environment: true
4444
enable-cache: true
@@ -171,7 +171,7 @@ jobs:
171171
check-latest: true
172172

173173
- name: Install uv
174-
uses: astral-sh/setup-uv@6b9c6063abd6010835644d4c2e1bef4cf5cd0fca # v6.0.1
174+
uses: astral-sh/setup-uv@f0ec1fc3b38f5e7cd731bb6ce540c5af426746bb # v6.1.0
175175
with:
176176
activate-environment: true
177177
enable-cache: true
@@ -298,7 +298,7 @@ jobs:
298298
python-version: ${{ matrix.python-version }}
299299

300300
- name: Install uv
301-
uses: astral-sh/setup-uv@6b9c6063abd6010835644d4c2e1bef4cf5cd0fca # v6.0.1
301+
uses: astral-sh/setup-uv@f0ec1fc3b38f5e7cd731bb6ce540c5af426746bb # v6.1.0
302302
with:
303303
activate-environment: true
304304
enable-cache: true
@@ -446,7 +446,7 @@ jobs:
446446
python-version: "3.12"
447447

448448
- name: Install uv
449-
uses: astral-sh/setup-uv@6b9c6063abd6010835644d4c2e1bef4cf5cd0fca # v6.0.1
449+
uses: astral-sh/setup-uv@f0ec1fc3b38f5e7cd731bb6ce540c5af426746bb # v6.1.0
450450
with:
451451
activate-environment: true
452452
enable-cache: true

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ repos:
2626
- id: mypy
2727
exclude: build_helpers
2828
additional_dependencies:
29-
- types-cachetools==5.5.0.20240820
29+
- types-cachetools==6.0.0.20250525
3030
- types-filelock==3.2.7
3131
- types-requests==2.32.0.20250515
3232
- types-tabulate==0.9.0.20241207
@@ -43,7 +43,7 @@ repos:
4343

4444
- repo: https://github.com/charliermarsh/ruff-pre-commit
4545
# Ruff version.
46-
rev: 'v0.11.10'
46+
rev: 'v0.11.11'
4747
hooks:
4848
- id: ruff
4949
- id: ruff-format
@@ -82,6 +82,6 @@ repos:
8282

8383
# Ensure github actions remain safe
8484
- repo: https://github.com/woodruffw/zizmor-pre-commit
85-
rev: v1.7.0
85+
rev: v1.8.0
8686
hooks:
8787
- id: zizmor
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
## Exit logic comparisons
2+
3+
Freqtrade allows your strategy to implement different exit logic using signal-based or callback-based functions.
4+
This section aims to compare each different function, helping you to choose the one that best fits your needs.
5+
6+
* **`populate_exit_trend()`** - Vectorized signal-based exit logic using indicators in the main dataframe
7+
**Use** to define exit signals based on indicators or other data that can be calculated in a vectorized manner.
8+
🚫 **Don't use** to customize exit conditions for each individual trade, or if trade data is necessary to make an exit decision.
9+
* **`custom_exit()`** - Custom exit logic that will fully exit a trade immediately, called for every open trade at every bot loop iteration until a trade is closed.
10+
**Use** to specify exit conditions for each individual trade (including any additional adjusted orders using `adjust_trade_position()`), or if trade data is necessary to make an exit decision, e.g. using profit data to exit.
11+
🚫 **Don't use** when you want to exit using vectorised indicator-based data (use a `populate_exit_trend()` signal instead), or as a proxy for `custom_stoploss()`, and be aware that rate-based exits in backtesting can be inaccurate.
12+
* **`custom_stoploss()`** - Custom trailing stoploss, called for every open trade every iteration until a trade is closed. The value returned here is also used for [stoploss on exchange](stoploss.md#stop-loss-on-exchangefreqtrade).
13+
**Use** to customize the stoploss logic to set a dynamic stoploss based on trade data or other conditions.
14+
🚫 **Don't use** to exit a trade immediately based on a specific condition. Use `custom_exit()` for that purpose.
15+
* **`custom_roi()`** - Custom ROI, called for every open trade every iteration until a trade is closed.
16+
**Use** to specify a minimum ROI threshold ("take-profit") to exit a trade at this ROI level at some point within the trade duration, based on profit or other conditions.
17+
🚫 **Don't use** to exit a trade immediately based on a specific condition. Use `custom_exit()`.
18+
🚫 **Don't use** for static ROI. Use `minimal_roi`.

docs/strategy-callbacks.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ Currently available callbacks:
2727

2828
--8<-- "includes/strategy-imports.md"
2929

30+
--8<-- "includes/strategy-exit-comparisons.md"
31+
32+
3033
## Bot start
3134

3235
A simple callback which is called once when the strategy is loaded.

0 commit comments

Comments
 (0)