You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Lewis, thanks for pointing this out, it slipped through when I first added MTF capability and rarely used local data files.
I've fixed this now, so if you update to version 0.5.4 it should work as expected.
Great suggestion! I have also added that in. The method you suggested is perfect, but I have changed the attribute name to 'MTF_data_files'. So, to import MTF data, you would use the following:
To anyone reading this issue, please note that as of AutoTrader v0.5.21, the preferred method of specifying local data files (both single timeframe and mult-timeframe) is the add_data method, documented here. This method allows providing price data from custom directories (outside of the project directory), as well as providing data for multi-instrument backtests.
Nonetheless, the methods discussed in the comments above are still functional.
Describe the bug
When specifying your own data file the AutoTrader initialisation fails due to a variable being referenced before the assignment.
To Reproduce
Steps to reproduce the behavior:
at.data_file = "ftx_data.csv"
UnboundLocalError: local variable 'MTF_data' referenced before assignment
Expected behavior
Support for local files
Screenshots
n/a
Additional context
Additionally is there any planned support for MTF local files? Possibly specifying a dictionary e.g.
Or can create a csv that encapsulates this same structure, but might be harder to initialise consistently. Using version
0.4.27
The text was updated successfully, but these errors were encountered: