class_docstr: This observer keeps track of full trades and plot the PnL level achieved
  when a trade is closed.
  
  A trade is open when a position goes from 0 (or crossing over 0) to X and
  is then closed when it goes back to 0 (or crosses over 0 in the opposite
  direction)
  
  Params:
    - ``pnlcomm`` (def: ``True``)
  
      Show net/profit and loss, i.e.: after commission. If set to ``False``
      if will show the result of trades before commission
class_docstr_tok: ["This","observer","keeps","track","of","full","trades","and","plot","the","PnL","level","achieved","when","a","trade","is","closed",".","A","trade","is","open","when","a","position","goes","from","0","(","or","crossing","over","0",")","to","X","and","is","then","closed","when","it","goes","back","to","0","(","or","crosses","over","0","in","the","opposite","direction",")","Params",":","-","``","pnlcomm","``","(","def",":","``","True","``",")","Show","net\/profit","and","loss",",","i.e",".",":","after","commission",".","If","set","to","``","False","``","if","will","show","the","result","of","trades","before","commission"]
code: def __init__(self):
      self.trades = 0
  
      self.trades_long = 0
      self.trades_short = 0
  
      self.trades_plus = 0
      self.trades_minus = 0
  
      self.trades_plus_gross = 0
      self.trades_minus_gross = 0
  
      self.trades_win = 0
      self.trades_win_max = 0
      self.trades_win_min = 0
  
      self.trades_loss = 0
      self.trades_loss_max = 0
      self.trades_loss_min = 0
  
      self.trades_length = 0
      self.trades_length_max = 0
      self.trades_length_min = 0
  
file_path: backtrader/backtrader/observers/trades.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import uuid
  from ..None import Observer
  from ..utils.py3 import with_metaclass
  from ..trade import Trade
label_desc: Use image node_id 1 to create a new Trades object from inherited base classes: Observer with example: obj = Trades()