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/

    Simple stoploss within next function

    General Code/Help
    3
    5
    154
    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.
    • aviral
      aviral last edited by

      Hi, Is there a way to add a simple stop loss within the next function?

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

        So just clarifying, I am looking to push a market order with a simple stop loss.

        If this can be done with one function call, that would actually be perfect.

        1 Reply Last reply Reply Quote 0
        • A
          ab_trader last edited by

          Check bracket orders - Docs - Bracket Orders

          • If my answer helped, hit reputation up arrow at lower right corner of the post.
          • Python Debugging With Pdb
          • New to python and bt - check this out
          aviral 1 Reply Last reply Reply Quote 0
          • aviral
            aviral @ab_trader last edited by

            @ab_trader the only question is can we only have a stop price and not a take profit with a bracket order?

            Thanks for the help.

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

              And ... why don't you try it? Experience is the mother of science. The documentation linked by @ab_trader does even detail how to issue the orders manually, which obviously implies you can skip some of the steps in the manual setup

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