Navigation

    Backtrader Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. Alon Horesh
    For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/
    A
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 7
    • Best 0
    • Groups 0

    Alon Horesh

    @Alon Horesh

    0
    Reputation
    293
    Profile views
    7
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    Alon Horesh Unfollow Follow

    Latest posts made by Alon Horesh

    • RE: No backfill from IB

      @jakub-wozniak
      Jakub,

      Can you please post the main code flow you use to connect to IB and trade? I have the same problem with my paper account.

      Thank you.

      posted in General Code/Help
      A
      Alon Horesh
    • RE: Handling multi assets with custom indicator

      oops , mistake ..

      posted in Indicators/Strategies/Analyzers
      A
      Alon Horesh
    • RE: which ticker opened/closed in notify_order

      here is the entire code sample:
      # Create a cerebro entity
      cerebro = bt.Cerebro()

      # load symbol list from file
      with open('list.txt', 'r') as f:
          reader = csv.reader(f)
          tickers = list(reader)
      
      for ticker in tickers:
          # Create a Data Feed
          data = bt.feeds.QuandlCSV(
              dataname=ticker[0]+'.csv',
              fromdate=datetime.datetime(2013, 1, 1),
              todate=datetime.datetime(2016, 12, 29),
              adjclose=False, reverse=True)
          # Add the Data Feed to Cerebro
          cerebro.adddata(data)
      
      posted in General Code/Help
      A
      Alon Horesh
    • RE: which ticker opened/closed in notify_order

      the data was added using cerebro.adddata
      for ticker in tickers:
      # Create a Data Feed
      data = bt.feeds.QuandlCSV(
      dataname='ticker[0]+'.csv',
      fromdate=datetime.datetime(2013, 1, 1),
      todate=datetime.datetime(2016, 12, 29),
      adjclose=False, reverse=True)
      # Add the Data Feed to Cerebro
      cerebro.adddata(data)

      posted in General Code/Help
      A
      Alon Horesh
    • RE: which ticker opened/closed in notify_order

      I added the data source with
      data = bt.feeds.QuandlCSV(dataname="+ticker[0]+".csv",...)
      but when calling print(order.data._name) I get the name of the ticker for datas[0] every time, regardless of the order sent to the print command, BTW all other parameters are displayed OK, only the _name is the same.
      it should be basic and intuitive to get the ticker symbol.

      posted in General Code/Help
      A
      Alon Horesh
    • RE: which ticker opened/closed in notify_order

      but data attribute does not include the ticker, or am I missing something?
      what is the data attribute for the ticker symbol?

      posted in General Code/Help
      A
      Alon Horesh
    • which ticker opened/closed in notify_order

      How can I tell which ticker symbol was opened or closed when notify_order is called?

      posted in General Code/Help
      A
      Alon Horesh