class_docstr: Provides statistics on closed trades (keeps also the count of open ones)
  
    - Total Open/Closed Trades
  
    - Streak Won/Lost Current/Longest
  
    - ProfitAndLoss Total/Average
  
    - Won/Lost Count/ Total PNL/ Average PNL / Max PNL
  
    - Long/Short Count/ Total PNL / Average PNL / Max PNL
  
        - Won/Lost Count/ Total PNL/ Average PNL / Max PNL
  
    - Length (bars in the market)
  
      - Total/Average/Max/Min
  
      - Won/Lost Total/Average/Max/Min
  
      - Long/Short Total/Average/Max/Min
  
        - Won/Lost Total/Average/Max/Min
  
  Note:
  
    The analyzer uses an "auto"dict for the fields, which means that if no
    trades are executed, no statistics will be generated.
  
    In that case there will be a single field/subfield in the dictionary
    returned by ``get_analysis``, namely:
  
      - dictname['total']['total'] which will have a value of 0 (the field is
        also reachable with dot notation dictname.total.total
code: def create_analysis(self):
      self.rets = AutoOrderedDict()
      self.rets.total.total = 0
  
file_path: backtrader/backtrader/analyzers/tradeanalyzer.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import sys
  from backtrader import Analyzer
  from backtrader.utils import AutoOrderedDict, AutoDict
  from backtrader.utils.py3 import MAXINT
label_desc: Use image node_id 1 for calling the TradeAnalyzer obj's underlying member method code with example usage: obj.create_analysis() without return types