Navigation

    Backtrader Community

    • Register
    • 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/

    Fetch existing positions from Oanda into backrader

    General Discussion
    3
    6
    34
    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.
    • A
      anil last edited by

      Hi
      I am looking at using backtrader to automate live trading using Oanda as my preferred broker. Ideally I would like to fetch my existing positions from my Oanda account [both manually created positions and those created via backtrader into my Bt strategy - I have no issue using Backtrader with Oanda if I avoid closing or cancelling existing orders manually, directly on Oanda. I was looking at enhancing the notify_store function to handle this scenario - Is this the right approach ? Has anyone in the community tried to achieve something along the same lines? Any help appreciated.

      R 1 Reply Last reply Reply Quote 0
      • R
        rajanprabu @anil last edited by

        @anil

        you can set use_positions=True while initiating the broker which will fetch positions from your account. its the default behaviour for default Oanda implementation available along with BT as well as for Oanda v20 store.

        A R 2 Replies Last reply Reply Quote 1
        • A
          anil @rajanprabu last edited by

          @rajanprabu
          Thank you Rajanprabu

          1 Reply Last reply Reply Quote 0
          • R
            rajanprabu @rajanprabu last edited by

            Why would someone downvote this answer :-(

            vladisld 1 Reply Last reply Reply Quote 0
            • vladisld
              vladisld @rajanprabu last edited by

              @rajanprabu Sorry, wanted to upvote, but clicked the wrong button - fixed.

              R 1 Reply Last reply Reply Quote 0
              • R
                rajanprabu @vladisld last edited by

                :-) Thanks @vladisld

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                • First post
                  Last post
                Copyright © 2016, 2017, 2018 NodeBB Forums | Contributors
                $(document).ready(function () { app.coldLoad(); }); }