For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/
How to access TradeAnalyzer object within a custom strategy?
-
How to access TradeAnalyzer object within my custom strategy without waiting for entire run to complete?
class MyStrategy(bt.Strategy): self.bt.analyzers.TradeAnalyzer.get_analysis()
I do see below recommend process.
cerebro.addanalyzer(bt.analyzers.TradeAnalyzer, _name="ta") results_list = cerebro.run() for i in range(0, len(results_list)): printTradeAnalysis(results_list[i][0].analyzers.ta.get_analysis()
Thank you!