code: def next(self):
      self.callcounter += 1
  
      txtfields = list()
      txtfields.append("%04d" % self.callcounter)
      txtfields.append("%04d" % len(self))
      txtfields.append("%04d" % len(self.data0))
      txtfields.append(self.data.datetime.datetime(0).isoformat())
      txtfields.append("%.2f" % self.data0.open[0])
      txtfields.append("%.2f" % self.data0.high[0])
      txtfields.append("%.2f" % self.data0.low[0])
      txtfields.append("%.2f" % self.data0.close[0])
      txtfields.append("%.2f" % self.data0.volume[0])
      txtfields.append("%.2f" % self.data0.openinterest[0])
      print(",".join(txtfields))
  
      if not self.position:
          if len(self.data) > self.lcontrol:
              if self.data.high == self.highest:  # today is highest!!!
                  print(
                      "High %.2f > Highest %.2f"
                      % (self.data.high[0], self.highest[0])
                  )
                  print(
                      "LAST 19 highs:",
                      self.data.high.get(size=19, ago=-1),
                  )
                  print(
                      "-- BUY on date:",
                      self.data.datetime.date().strftime("%Y-%m-%d"),
                  )
                  ex = (
                      bt.Order.Market
                      if self.p.market
                      else bt.Order.Close
                  )
                  self.buy(exectype=ex)
                  self.inmarket = len(self)  # reset period in market
  
      else:  # in the market
          if (len(self) - self.inmarket) >= self.p.sellafter:
              self.sell()
  
      self.lcontrol = len(self.data)
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import argparse
  import datetime
  import backtrader
  import backtrader.indicators
label_desc: Use image node_id 4 for calling the St obj's underlying member method code with example usage: obj.next() without return types