adding the option to resolver
This commit is contained in:
parent
f55d75e7fc
commit
a772ab323e
@ -73,6 +73,7 @@ CONF_SCHEMA = {
|
|||||||
'trailing_stop': {'type': 'boolean'},
|
'trailing_stop': {'type': 'boolean'},
|
||||||
'trailing_stop_positive': {'type': 'number', 'minimum': 0, 'maximum': 1},
|
'trailing_stop_positive': {'type': 'number', 'minimum': 0, 'maximum': 1},
|
||||||
'trailing_stop_positive_offset': {'type': 'number', 'minimum': 0, 'maximum': 1},
|
'trailing_stop_positive_offset': {'type': 'number', 'minimum': 0, 'maximum': 1},
|
||||||
|
'trailing_only_offset_is_reached': {'type': 'boolean'},
|
||||||
'unfilledtimeout': {
|
'unfilledtimeout': {
|
||||||
'type': 'object',
|
'type': 'object',
|
||||||
'properties': {
|
'properties': {
|
||||||
|
@ -46,18 +46,19 @@ class StrategyResolver(IResolver):
|
|||||||
# Set attributes
|
# Set attributes
|
||||||
# Check if we need to override configuration
|
# Check if we need to override configuration
|
||||||
# (Attribute name, default, experimental)
|
# (Attribute name, default, experimental)
|
||||||
attributes = [("minimal_roi", None, False),
|
attributes = [("minimal_roi", None, False),
|
||||||
("ticker_interval", None, False),
|
("ticker_interval", None, False),
|
||||||
("stoploss", None, False),
|
("stoploss", None, False),
|
||||||
("trailing_stop", None, False),
|
("trailing_stop", None, False),
|
||||||
("trailing_stop_positive", None, False),
|
("trailing_stop_positive", None, False),
|
||||||
("trailing_stop_positive_offset", 0.0, False),
|
("trailing_stop_positive_offset", 0.0, False),
|
||||||
("process_only_new_candles", None, False),
|
("trailing_only_offset_is_reached", None, False),
|
||||||
("order_types", None, False),
|
("process_only_new_candles", None, False),
|
||||||
("order_time_in_force", None, False),
|
("order_types", None, False),
|
||||||
("use_sell_signal", False, True),
|
("order_time_in_force", None, False),
|
||||||
("sell_profit_only", False, True),
|
("use_sell_signal", False, True),
|
||||||
("ignore_roi_if_buy_signal", False, True),
|
("sell_profit_only", False, True),
|
||||||
|
("ignore_roi_if_buy_signal", False, True),
|
||||||
]
|
]
|
||||||
for attribute, default, experimental in attributes:
|
for attribute, default, experimental in attributes:
|
||||||
if experimental:
|
if experimental:
|
||||||
|
@ -73,6 +73,7 @@ class IStrategy(ABC):
|
|||||||
trailing_stop: bool = False
|
trailing_stop: bool = False
|
||||||
trailing_stop_positive: float
|
trailing_stop_positive: float
|
||||||
trailing_stop_positive_offset: float
|
trailing_stop_positive_offset: float
|
||||||
|
trailing_only_offset_is_reached = False
|
||||||
|
|
||||||
# associated ticker interval
|
# associated ticker interval
|
||||||
ticker_interval: str
|
ticker_interval: str
|
||||||
|
Loading…
Reference in New Issue
Block a user