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 get line opening value

    General Code/Help
    2
    2
    466
    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.
    • D
      Dvenzi last edited by

      Hello,

      first of all i'm new to backtrader, as i was reading the quickstart guide i noticed that lines have values such as "open" and "close", and the way to access the current close value is : datas[0].close . Am i correct to assume that to check the opening value for the same line i would use datas[0].open ?

      Thanks in advance (sorry for the silly question, and also sorry if i posted this question on the wrong category).

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

        The actual lines available in a data feed can be defined by you. In a general case a regular data feed will be a subclass of the abstract data base and will at least have open, high, low, close, volume, openinterest and datetime.

        You can see the lines of each data feed in the reference. Docs - Data Feeds Reference

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