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 use backtrader built-in indicator like a 'normal' indicator?

    General Code/Help
    2
    2
    26
    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.
    • weibudda
      weibudda last edited by

      When I use backtrader built-in indicator out-of backtrader environment,

      a = bt.indicators.EMA(datas.close, period=13)
      

      it returns a <backtrader.indicators.ema.EMA at 0x1af69d08> object, with data lengtn of 0
      How to get a normal data array like datas.close, instead of an empty object?

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

        @weibudda

        This could help.

        https://www.backtrader.com/docu/concepts/#getting-a-slice

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