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/

    Is there an easy way to debug live trading?

    General Code/Help
    2
    3
    1210
    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.
    • T
      Taewoo Kim last edited by Taewoo Kim

      I've tried putting in print statements in oandapy.py

      def request(self, endpoint, method='GET', params=None):
      

      but not seeing it in console.. (and orders not hitting oanda servers).. which makes me wonder if the oandapy module is being called at all. But if I use command line using curl (with same acctid/apikey), it seems to work fine.

      The constructor (def init) seems to be getting hit... the request method, on the other hand, does not seem to be.`

      Is there a smarter way to debug?

      T 1 Reply Last reply Reply Quote 0
      • T
        Taewoo Kim @Taewoo Kim last edited by

        Never mind.

        Solved it. It turns out buy_bracket() with float(size) doesn't work.. it accepts int(size)

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

          buy_bracket itself doesn't look at anything. It simply generates orders and delegates to the rest of the platform. But if the size doesn't make sense (float) things will probably break somewhere.

          There is no specific provision to forbid passing a float, but there is also no effort made to check that it isn't passed.

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