When attempting to go live with my simple algorithm, I'm getting errors - how can I load history from a specific time period only than and to avoid this error? My indicators only really need a few weeks of back data to work.
Here was the initial error that I had received from the history command
Failed to initialize algorithm: Python.Runtime.PythonException: KeyError : 'the label [BTCUSD] is not in the [index]'
at Python.Runtime.PyObject.Invoke (Python.Runtime.PyTuple args, Python.Runtime.PyDict kw) [0x00033] in <69d4fd635645431aa1e955e701040fd1>:0 ...etc etc
Here is the code that is attempting to call the history
history = self.History(dataset, 19, Resolution.Minute)
# Populate warmup data
for index, row in history.loc["BTCUSD"].iterrows():
self.fast_btc.Update(index, row["close"])
self.slow_btc.Update(index, row["close"])
How can I set the StartDate for the History command to 2017 and not have empty history dataframes?