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/

    Creating lines based on args

    Indicators/Strategies/Analyzers
    1
    2
    131
    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.
    • Mariano Bengeldorf
      Mariano Bengeldorf last edited by

      Hi there,
      I am trying to create N lines to use for an indicator, but I would like to define N using an argument (using argsparse) having N as a parameter (in the parameters tuple) in an indicator. So that when I run the scrip from the terminal I can enter N. Then the number of lines created would be N.
      Is that possible to be done?.
      What I notice is that once the number of lines is defined with the default value that was entered as a parameter as a class variable it cannot be changed by updating the N parameter trough an argument.

      Many thanks

      Mariano Bengeldorf 1 Reply Last reply Reply Quote 0
      • Mariano Bengeldorf
        Mariano Bengeldorf @Mariano Bengeldorf last edited by

        @Mariano-Bengeldorf You can disregard this question, I've found a solution.
        Best

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