Repository: freqtrade/freqtrade

Issue:
allow extra-parameters (ex : unfilledtimeout.buy) to be defined either in configuration file or strategy
**As** a trader,
**I want** to be able to customize strategy depends parameters (like `unfilledtimeout.buy`) straight in my strategy file
**So that** my configuration file in more generic,  not embedded strategy design choices and allow me to reduce the number of config file in dryrun/live.

`unfilledtimeout.buy` is just an example but others parameters can be strategy dependents.


Discussion:
well, this is easier to accomplish than you might think - it's technically one-liner, assuming you use a dict with 'buy', 'sell' keys in the strategy as follows

``` python
unfilledtimeout = {'buy': 20, 'sell': 20}
```

I am however not certain that this is a strategy related configuration ... to me, this depends on the exchange and pairs (volume), not so much about the strategy used...

Hi,

Tks for solution

> I am however not certain that this is a strategy related configuration ... to me, this depends on the exchange and pairs (volume), not so much about the strategy used...

1/ Interesting what it represent for you . I agree with your points but i also  consider it is timeframe dependent (you know i count in candle and not is time :-) ). It is ok for me too wait 1 or 2 candle to fill the order as i consider my buy entry have impact during n candles.

2/ When i read the section [docs : parameters in the strategy](https://www.freqtrade.io/en/latest/configuration/#parameters-in-the-strategy) it feel like i cannot use your solution (as the introspection/scope of strategy variable work only on the parameter list we can see in the doc).

Many things can be consider as strategy dependent (the stake_amount could depends on my stop_loss that depends of my strategy, the stake_currency as market behave differently, even the internals.process_throttle_secs has it don't need to compute every 5 seconds for 1h strategy).

In fine the config mix strategy / technical /exchange choices.

If we can define all parameters in strategy file if we would like (technically) so the section `Parameters in the strategy` is just an advice ? And you have understand for what is say below i don't consider it as exhaustive : maybe we can review all parameters to see what to put here ?

Have a nice day.
2) well - i said it's not much work to add a setting - it does not work now, sorry if that wasn't clear from the above.

> even the internals.process_throttle_secs has it don't need to compute every 5 seconds for 1h strategy).

I disagree on this - unless you use stoploss_on_exchange (which is only available for binance) this does make sense - since stoploss and ROI is checked every 5 seconds. Otherwise you may be "late" for your stoploss and loose 10% instead of the configured 5% , assuming a huge dump ...

> If we can define all parameters in strategy file if we would like (technically) so the section Parameters in the strategy is just an advice

I think you misunderstood this part from my previous comment - parameters can be fairly easily added to be transferred from strategy to config. no parameter that isn't listed in the docs should be transferred at the moment - and i would keep it this way as its complicating things

we're already have this section quite complicated, so i would keep the parameters loaded form the strategy as small as possible (Only what's REALLY related to the strategy).:

we load, in this sequence:
* From arguments
* from config
* from 2nd config ...
* from strategy 


Resolving patch:
diff --git a/freqtrade/resolvers/strategy_resolver.py b/freqtrade/resolvers/strategy_resolver.py
--- a/freqtrade/resolvers/strategy_resolver.py
+++ b/freqtrade/resolvers/strategy_resolver.py
@@ -61,6 +61,7 @@ def __init__(self, config: Optional[Dict] = None) -> None:
                       ("stake_currency",                  None,        False),
                       ("stake_amount",                    None,        False),
                       ("startup_candle_count",            None,        False),
+                      ("unfilledtimeout",                 None,        False),
                       ("use_sell_signal",                 True,        True),
                       ("sell_profit_only",                False,       True),
                       ("ignore_roi_if_buy_signal",        False,       True),


Test patch: