Backtrader Community

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/

    Multi store notifications.. how to mange ?

    General Code/Help
    3
    5
    325
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      rajanprabu last edited by

      Hi all,

      I wrote two stores for two different brokers, but I want to use data feed from one and broker from another. It works fine, but notify_store works only from the store that I subscribe the data. Store Notifications are not coming from the store that I add as a broker instance. My guess is that data store gets registered first as its the first thing that gets initialised.

      My question is it possible to get store notifications from both stores ? Following is the code that I use for both data and broker. Any help is highly appreciated.

      cerebro = bt.Cerebro(quicknotify=True)
          
      abstore = AngelStore(api_key= data['api_key'], access_token = data['Token'], angel_instruments_json=dir +'instruments.json')
      zbstore = ZerodhaStore(api_key = user_data['api_key'], token = user_data['token'],  zb_instruments_csv=dir + 'zb_inst.csv')
          
      cerebro.broker = abstore.getbroker()
      
      data0 = zbstore.getdata(dataname='STK-NSE-IDEA',
              timeframe=bt.TimeFrame.Ticks,  
              sessionstart=datetime.time(9, 15), 
              sessionend=datetime.time(15, 30)
          )
      
      R 1 Reply Last reply Reply Quote 1
      • R
        rajanprabu @rajanprabu last edited by

        @vladisld @run-out

        Any pointers on this ?

        1 Reply Last reply Reply Quote 0
        • J
          jvdeepak last edited by

          @rajanprabu sorry for the out of topic message. Would you be interested in paid custom coding work using backtrader ?

          Telegram: @jvdeepak

          run-out 1 Reply Last reply Reply Quote 0
          • run-out
            run-out @jvdeepak last edited by

            @jvdeepak If you go to the user profile there's an email addy.

            RunBacktest.com

            J 1 Reply Last reply Reply Quote 0
            • J
              jvdeepak @run-out last edited by

              @run-out I did check his user profile but couldn't find his email.

              Telegram: @jvdeepak

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post
              Copyright © 2016, 2017, 2018, 2019, 2020, 2021 NodeBB Forums | Contributors