class_docstr: A simple helper strategy that operates on position entry/exit signals.
  This makes the backtest of the strategy simulate a [vectorized backtest].
  See [tutorials] for usage examples.
  
  [vectorized backtest]: https://www.google.com/search?q=vectorized+backtest
  [tutorials]: index.html#tutorials
  
  To use this helper strategy, subclass it, override its
  `backtesting.backtesting.Strategy.init` method,
  and set the signal vector by calling
  `backtesting.lib.SignalStrategy.set_signal` method from within it.
  
      class ExampleStrategy(SignalStrategy):
          def init(self):
              super().init()
              self.set_signal(sma1 > sma2, sma1 < sma2)
  
  Remember to call `super().init()` and `super().next()` in your
  overridden methods.
code: def next(self):
      super().next()
  
      exit_portion = self.__exit_signal[-1]
      if exit_portion > 0:
          for trade in self.trades:
              if trade.is_long:
                  trade.close(exit_portion)
      elif exit_portion < 0:
          for trade in self.trades:
              if trade.is_short:
                  trade.close(-exit_portion)
  
      entry_size = self.__entry_signal[-1]
      if entry_size > 0:
          self.buy(size=entry_size)
      elif entry_size < 0:
          self.sell(size=-entry_size)
  
imports: from collections import OrderedDict
  from inspect import currentframe
  from itertools import compress
  from numbers import Number
  from typing import Callable, Optional, Sequence, Union
  import numpy
  import pandas
  from ._plotting import plot_heatmaps
  from ._stats import compute_stats
  from ._util import _Array, _as_str
  from .backtesting import Strategy
label_desc: Use image node_id 2 for calling the SignalStrategy obj's underlying member method code with example usage: obj.next() without return types