Run strategy only once indicators are warmed up
I have written a strategy that relies on a 200-day SMA. Therefore, during the first 200 days in my strategy, this indicator simply is not available.
How can I make it that backtrader only runs my strategy once it has gathered the data for 200 days so that my SMA 200 indicator is available?
vladisld last edited by
AFAIU this is a default Backtrader behavior. The indicators usually define their period such that the strategy will not get its
nextmethod called unit enough bars will be fetched to satisfy the indicators period.
Are you experiencing a different behavior?
run-out last edited by