code: def next(self):
      if self.orefs:
          return  # pending orders do nothing
  
      if not self.position:
          if self.cross > 0.0:  # crossing up
              close = self.data.close[0]
              p1 = close * (1.0 - self.p.limit)
              p2 = p1 - 0.02 * close
              p3 = p1 + 0.02 * close
  
              valid1 = datetime.timedelta(self.p.limdays)
              valid2 = valid3 = datetime.timedelta(self.p.limdays2)
  
              if self.p.switchp1p2:
                  p1, p2 = p2, p1
                  valid1, valid2 = valid2, valid1
  
              if not self.p.usebracket:
                  o1 = self.buy(
                      exectype=bt.Order.Limit,
                      price=p1,
                      valid=valid1,
                      transmit=False,
                  )
  
                  print(
                      "{}: Oref {} / Buy at {}".format(
                          self.datetime.date(), o1.ref, p1
                      )
                  )
  
                  o2 = self.sell(
                      exectype=bt.Order.Stop,
                      price=p2,
                      valid=valid2,
                      parent=o1,
                      transmit=False,
                  )
  
                  print(
                      "{}: Oref {} / Sell Stop at {}".format(
                          self.datetime.date(), o2.ref, p2
                      )
                  )
  
                  o3 = self.sell(
                      exectype=bt.Order.Limit,
                      price=p3,
                      valid=valid3,
                      parent=o1,
                      transmit=True,
                  )
  
                  print(
                      "{}: Oref {} / Sell Limit at {}".format(
                          self.datetime.date(), o3.ref, p3
                      )
                  )
  
                  self.orefs = [o1.ref, o2.ref, o3.ref]
  
              else:
                  os = self.buy_bracket(
                      price=p1,
                      valid=valid1,
                      stopprice=p2,
                      stopargs=dict(valid=valid2),
                      limitprice=p3,
                      limitargs=dict(valid=valid3),
                  )
  
                  self.orefs = [o.ref for o in os]
  
      else:  # in the market
          if (len(self) - self.holdstart) >= self.p.hold:
              pass
  
file_path: backtrader/samples/bracket/bracket.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import argparse
  import datetime
  import backtrader
label_desc: Use image node_id 3 for calling the St obj's underlying member method code with example usage: obj.next() without return types