code: def onBars(self, bars):
      vwap = self.__vwap[-1]
      if vwap is None:
          return
  
      shares = self.getBroker().getShares(self.__instrument)
      price = bars[self.__instrument].getClose()
      notional = shares * price
  
      if price > vwap * (1 + self.__threshold) and notional < 1000000:
          self.marketOrder(self.__instrument, 100)
      elif price < vwap * (1 - self.__threshold) and notional > 0:
          self.marketOrder(self.__instrument, -100)
  
file_path: pyalgotrade/samples/vwap_momentum.py
imports: from __future__ import print_function
  from pyalgotrade import strategy
  from pyalgotrade import plotter
  from pyalgotrade.tools import quandl
  from pyalgotrade.technical import vwap
  from pyalgotrade.stratanalyzer import sharpe
label_desc: Use image node_id 3 for calling the VWAPMomentum obj's underlying member method code with example usage: obj.onBars(bars) without return types