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#
|
Add a virtual OHLCV value at the end of the pair OHLCV data series if there is no real value. |
|
|
|
Forward-fill OHLCV data for multiple trading pairs. |
|
Create a new placeholder OHLCV entry based on the last valid entry. |