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/

    Cheat Sheet Existing?

    General Discussion
    2
    3
    826
    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.
    • NewestTrader
      NewestTrader last edited by

      Hi,

      is there anything like a cheatsheet for the most common Backtrader coding snippets/things to remember?

      E.g.:

      1. Possible values an order can have:
      • order.Submitted(1)
      • order.Accepted(2)
      • order.Completed(4)
      • order.Canceled(5)
      • order.Expired(6)
      • order.Margin(7)
      • order.Rejected(8)
      1. get the present sum of both cash and positions:
      • self.broker.getvalue()
      1 Reply Last reply Reply Quote 0
      • B
        backtrader administrators last edited by

        Relying on numeric values is doomed to fail if the numeric values change. That's why they are always referenced by name and not by value.

        A cheatsheet is not known to exist.

        1 Reply Last reply Reply Quote 0
        • NewestTrader
          NewestTrader last edited by

          thanks for your reply

          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(); }); }