A lot of new users get confused over the process_only_new_candles
config, especially on what it actually does. What it does actually very simple. When being set to true
, it will make populate functions (indicators, entry and exit trends) to be called only once when new candle arrives, which means they will only be called for every main timeframe minutes/hours. For example, if you are on 1h timeframe and setting it to true, the populate functions will only be called once per hour.
The next question is whether there is any benefit on setting it to false
to make the bot calls populate functions every throttle_secs (default to 5 secods). For 99.99% of users, the answer is no. There is no benefit on doing so. Why? Let me explain the basic principle of how populate indicators work.
Populate indicators will only received closed candles’ data. No matter how often you call the function, the candles’ data will remain the same as long as there is no new closed candle. That means there is no difference on indicators’ calculation whether you are calling populate indicators once per hour (if you are using 1h main timeframe) or every 5 secs. That also means that dataframe received by populate entry and exit trends also will be the same. In this case, there is no real benefit on setting process_only_new_candles
to false
. You are using more resources for no gain at all.
Does that means the config has no usage at all? Well, by calling the populate functions every throttle_secs, you can fetch current rate and orderbooks of those pairs. Please remember that such data can’t be used to calculate indicators, and they also aren’t available for backtest. For example, if your entry logic require current rate is below certain MA for certain entry logic to be triggered for example, then you can set the config to false, although you can also do such check on confirm_trade_entr
y to get similar logic while make the bot don’t use excessive amount of resources for nothing.
So in summary, 99.99% users don’t need to set process_only_new_candles
to false because their strats don’t need such level of data. And someof the 0.01% won’t use it anyway because of the fact that it’s not backtestable.