forward_fill#

API documentation for tradingstrategy.utils.forward_fill Python module in Trading Strategy.

Module description#

OHLCV data forward fill.

Forward fill missing OHLCV candles in market data feeds.

  • Trading Strategy market data feeds are sparse by default, to save bandwidth

  • DEXes small cap pairs see fewtrades and if there are no trades in a time frame, no candle is generated

  • Forward-filled data is used on the client side

  • We need to forward fill to make price look up, especially for stop losses faster, as forward-filled data can do a simple index look up to get a price, instead of backwinding to the last available price

Functions#

forward_fill(df, freq[, columns, ...])

Forward-fill OHLCV data for multiple trading pairs.