class_docstr: Bar Filler to add missing calendar days to trading days
  
  Params:
  
    - fill_price (def: None):
  
      > 0: The given value to fill
      0 or None: Use the last known closing price
      -1: Use the midpoint of the last bar (High-Low average)
  
    - fill_vol (def: float('NaN')):
  
      Value to use to fill the missing volume
  
    - fill_oi (def: float('NaN')):
  
      Value to use to fill the missing Open Interest
docstr: Fills one by one bars as needed from time_start to time_end
  
  Invalidates the control dtime_prev if requested
code: def _fillbars(self, data, dt, lastdt):
      """
      Fills one by one bars as needed from time_start to time_end
  
      Invalidates the control dtime_prev if requested
      """
      tm = data.datetime.time(0)  # get time part
  
      # Same price for all bars
      if self.p.fill_price > 0:
          price = self.p.fill_price
      elif not self.p.fill_price:
          price = data.close[-1]
      elif self.p.fill_price == -1:
          price = (data.high[-1] + data.low[-1]) / 2.0
  
      while lastdt < dt:
          lastdt += self.ONEDAY
  
          # Prepare an array of the needed size
          bar = [float("Nan")] * data.size()
          # Fill the datetime
          bar[data.DateTime] = data.date2num(
              datetime.combine(lastdt, tm)
          )
  
          # Fill price fields
          for pricetype in [data.Open, data.High, data.Low, data.Close]:
              bar[pricetype] = price
  
          # Fill volume and open interest
          bar[data.Volume] = self.p.fill_vol
          bar[data.OpenInterest] = self.p.fill_oi
  
          # Fill extra lines the data feed may have defined beyond DateTime
          for i in range(data.DateTime + 1, data.size()):
              bar[i] = data.lines[i][0]
  
          # Add this constructed bar to the stack of the stream
          data._add2stack(bar)
  
      # Save to stack the bar that signaled the gap
      data._save2stack(erase=True)
  
file_path: backtrader/backtrader/filters/calendardays.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  from datetime import date, datetime, timedelta
  from backtrader import TimeFrame
  from backtrader.utils.py3 import with_metaclass
  from ..None import metabase
label_desc: Use image node_id 3 for calling the CalendarDays obj's underlying member method code with example usage: obj._fillbars(data, dt, lastdt) without return types