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/

    How to run Oandatest demo?

    General Discussion
    3
    5
    638
    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.
    • xiaoy0521
      xiaoy0521 last edited by

      Hello Dro,
      I' m trying to use the code Oandatest.py but that doesn't work I have the following error:
      0_1553756313621_0ad8fd38-1067-4849-9c56-71830980ea20-图片.png
      I read old posts :https://community.backtrader.com/topic/99/oandatest-no-attribute-contractdetails
      but I'm a bit stupid, not find a way to continue. I just started learning to use backtrader, and run oandatest.py.
      I got oanda account and token , but don't know how to get old oanda API message .

      I change parameter attribute (account_id, token, data0)
      0_1553756704442_25e41fd4-0eaf-44c7-bb86-f8d8b0394633-图片.png

      if I don't change ,it's don't work and error:
      0_1553756810819_431320ef-8857-459b-8d51-d4e588737036-图片.png

      so, how to run oandatest.py succeed ? What should I pay attention? I couldn't find a way.
      please, give me a hand . thanks very much.

      1 Reply Last reply Reply Quote 0
      • B
        backtrader administrators last edited by

        I fail to understand why people post images of text ...

        In any case you are not letting people know how you run oandatest.py. In any case you probably have a v20 account and that won't work unless you use a broker compatible with it. See

        • https://github.com/ftomassetti/backtrader-oandav20
        xiaoy0521 1 Reply Last reply Reply Quote 0
        • xiaoy0521
          xiaoy0521 last edited by

          sorry, This is my first question, My picture might be a little bit more intuitive, I used pycharm to run oandatest.py, I don't use a broker compatible with it. just one project of backtrader( https://github.com/backtrader/backtrader), then ,run some demo to learn.
          I go to see it(https://github.com/ftomassetti/backtrader-oandav20), and try again.
          Do I need to introduce other components? In addition to oandav20.
          I just came into contact with this, and the purpose is hope to learn the data-driven process of the project through running live data feed demo and debugging.
          Thank you so much for your reply and advice.

          1 Reply Last reply Reply Quote 0
          • xiaoy0521
            xiaoy0521 @backtrader last edited by

            @backtrader

            sorry, This is my first question, My picture might be a little bit more intuitive, I used pycharm to run oandatest.py, I don't use a broker compatible with it. just one project of backtrader( https://github.com/backtrader/backtrader), then ,run some demo to learn.
            My answer was wrong, I pip install oandav20, and it's also don't work.
            The error info is consistent with the images posted.

            D 1 Reply Last reply Reply Quote 0
            • D
              dasch @xiaoy0521 last edited by dasch

              @xiaoy0521 on https://github.com/ftomassetti/backtrader-oandav20 there is some installation guide. In the directory examples, you will find oandav20test.py . This may help you get started.

              also you need v20 instead of oandav20.

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