code: def runstrat():
      args = parse_args()
  
      fromdate = datetime.datetime.strptime(args.fromdate, "%Y-%m-%d")
      todate = datetime.datetime.strptime(args.todate, "%Y-%m-%d")
  
      cerebro = bt.Cerebro(stdstats=False)
  
      DataFeed = btfeeds.YahooFinanceCSVData
      if args.online:
          DataFeed = btfeeds.YahooFinanceData
  
      data0 = DataFeed(
          dataname=args.data0, fromdate=fromdate, todate=todate
      )
  
      if args.data1:
          data1 = DataFeed(
              dataname=args.data1, fromdate=fromdate, todate=todate
          )
      else:
          data1 = data0.clone()
  
      if args.filler or args.filler0:
          data0.addfilter(WeekDaysFiller, fillclose=args.fillclose)
  
      if args.filler or args.filler1:
          data1.addfilter(WeekDaysFiller, fillclose=args.fillclose)
  
      cerebro.adddata(data0)
      cerebro.adddata(data1)
  
      cerebro.addstrategy(St, sma=args.sma)
      cerebro.run(runonce=True, preload=True)
  
      if args.plot:
          cerebro.plot(style="bar")
  
file_path: backtrader/samples/weekdays-filler/weekdaysaligner.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import argparse
  import datetime
  import backtrader
  import backtrader.feeds
  import backtrader.indicators
  import backtrader.utils.flushfile
  from weekdaysfiller import WeekDaysFiller
label_desc: Use image node_id 1 for calling a global function with example usage: runstrat() without return types