Change default value of process_only_new_candles to True since False is an uncommon usecase for expert strategy devs

This commit is contained in:
robcaulk 2022-05-23 10:24:58 +02:00
parent 063fc5174d
commit 5c4014ee62
5 changed files with 7 additions and 7 deletions

View File

@ -140,7 +140,7 @@ Mandatory parameters are marked as **Required**, which means that they are requi
| `dry_run` | **Required.** Define if the bot must be in Dry Run or production mode. <br>*Defaults to `true`.* <br> **Datatype:** Boolean
| `dry_run_wallet` | Define the starting amount in stake currency for the simulated wallet used by the bot running in Dry Run mode.<br>*Defaults to `1000`.* <br> **Datatype:** Float
| `cancel_open_orders_on_exit` | Cancel open orders when the `/stop` RPC command is issued, `Ctrl+C` is pressed or the bot dies unexpectedly. When set to `true`, this allows you to use `/stop` to cancel unfilled and partially filled orders in the event of a market crash. It does not impact open positions. <br>*Defaults to `false`.* <br> **Datatype:** Boolean
| `process_only_new_candles` | Enable processing of indicators only when new candles arrive. If false each loop populates the indicators, this will mean the same candle is processed many times creating system load but can be useful of your strategy depends on tick data not only candle. [Strategy Override](#parameters-in-the-strategy). <br>*Defaults to `false`.* <br> **Datatype:** Boolean
| `process_only_new_candles` | Enable processing of indicators only when new candles arrive. If false each loop populates the indicators, this will mean the same candle is processed many times creating system load but can be useful of your strategy depends on tick data not only candle. [Strategy Override](#parameters-in-the-strategy). <br>*Defaults to `true`.* <br> **Datatype:** Boolean
| `minimal_roi` | **Required.** Set the threshold as ratio the bot will use to exit a trade. [More information below](#understand-minimal_roi). [Strategy Override](#parameters-in-the-strategy). <br> **Datatype:** Dict
| `stoploss` | **Required.** Value as ratio of the stoploss used by the bot. More details in the [stoploss documentation](stoploss.md). [Strategy Override](#parameters-in-the-strategy). <br> **Datatype:** Float (as ratio)
| `trailing_stop` | Enables trailing stoploss (based on `stoploss` in either configuration or strategy file). More details in the [stoploss documentation](stoploss.md#trailing-stop-loss). [Strategy Override](#parameters-in-the-strategy). <br> **Datatype:** Boolean

View File

@ -82,7 +82,7 @@ class IStrategy(ABC, HyperStrategyMixin):
}
# run "populate_indicators" only for new candle
process_only_new_candles: bool = False
process_only_new_candles: bool = True
use_exit_signal: bool
exit_profit_only: bool

View File

@ -64,7 +64,7 @@ class {{ strategy }}(IStrategy):
# trailing_stop_positive_offset = 0.0 # Disabled / not configured
# Run "populate_indicators()" only for new candle.
process_only_new_candles = False
process_only_new_candles = True
# These values can be overridden in the config.
use_exit_signal = True

View File

@ -62,7 +62,7 @@ class SampleStrategy(IStrategy):
timeframe = '5m'
# Run "populate_indicators()" only for new candle.
process_only_new_candles = False
process_only_new_candles = True
# These values can be overridden in the config.
use_exit_signal = True

View File

@ -224,12 +224,12 @@ def test_strategy_override_process_only_new_candles(caplog, default_conf):
default_conf.update({
'strategy': CURRENT_TEST_STRATEGY,
'process_only_new_candles': True
'process_only_new_candles': False
})
strategy = StrategyResolver.load_strategy(default_conf)
assert strategy.process_only_new_candles
assert log_has("Override strategy 'process_only_new_candles' with value in config file: True.",
assert not strategy.process_only_new_candles
assert log_has("Override strategy 'process_only_new_candles' with value in config file: False.",
caplog)