mirror of
https://github.com/freqtrade/freqtrade.git
synced 2026-02-28 15:23:49 +00:00
Initial steps to change bid/ask pricing to enter/exit
This commit is contained in:
@@ -242,6 +242,8 @@ This should be given the value of `trade.is_short`.
|
||||
|
||||
```
|
||||
|
||||
After:
|
||||
|
||||
``` python hl_lines="5 7"
|
||||
def custom_stoploss(self, pair: str, trade: 'Trade', current_time: datetime,
|
||||
current_rate: float, current_profit: float, **kwargs) -> float:
|
||||
@@ -267,6 +269,8 @@ This should be given the value of `trade.is_short`.
|
||||
}
|
||||
```
|
||||
|
||||
After:
|
||||
|
||||
``` python hl_lines="2 3"
|
||||
order_time_in_force: Dict = {
|
||||
"entry": "gtc",
|
||||
@@ -291,6 +295,8 @@ This should be given the value of `trade.is_short`.
|
||||
}
|
||||
```
|
||||
|
||||
After:
|
||||
|
||||
``` python hl_lines="2-6"
|
||||
order_types = {
|
||||
"entry": "limit",
|
||||
@@ -317,6 +323,8 @@ unfilledtimeout = {
|
||||
}
|
||||
```
|
||||
|
||||
After:
|
||||
|
||||
``` python hl_lines="2-3"
|
||||
unfilledtimeout = {
|
||||
"entry": 10,
|
||||
@@ -325,3 +333,51 @@ unfilledtimeout = {
|
||||
"unit": "minutes"
|
||||
}
|
||||
```
|
||||
|
||||
#### `order pricing`
|
||||
|
||||
Order pricing changed in 2 ways. `bid_strategy` was renamed to `entry_strategy` and `ask_strategy` was renamed to `exit_strategy`.
|
||||
Also, price-side can now be defined as `ask`, `bid`, `same` or `other`.
|
||||
Please refer to the [pricing documentation](configuration.md) for more information.
|
||||
|
||||
``` json hl_lines="2-3 12-13"
|
||||
{
|
||||
"bid_strategy": {
|
||||
"price_side": "bid",
|
||||
"use_order_book": true,
|
||||
"order_book_top": 1,
|
||||
"ask_last_balance": 0.0,
|
||||
"check_depth_of_market": {
|
||||
"enabled": false,
|
||||
"bids_to_ask_delta": 1
|
||||
}
|
||||
},
|
||||
"ask_strategy":{
|
||||
"price_side": "ask",
|
||||
"use_order_book": true,
|
||||
"order_book_top": 1
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
after:
|
||||
|
||||
``` json hl_lines="2-3 12-13"
|
||||
{
|
||||
"entry_pricing": {
|
||||
"price_side": "same",
|
||||
"use_order_book": true,
|
||||
"order_book_top": 1,
|
||||
"ask_last_balance": 0.0,
|
||||
"check_depth_of_market": {
|
||||
"enabled": false,
|
||||
"bids_to_ask_delta": 1
|
||||
}
|
||||
},
|
||||
"exit_pricing":{
|
||||
"price_side": "same",
|
||||
"use_order_book": true,
|
||||
"order_book_top": 1
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user