For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/
Build a datafeed with multi-index OHLC dataframe
-
Is there a way to build a datafeed with multi-index OHLC dataframe inputs, such as (date, symbol) as the index, and OHLCV as the columns? Thanks!
-
Yes. You loop through the dataframe using symbols and add a fresh backtrader dataline in each loop. You can also add the symbol name at the same time if available.