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/

    Order Created Not Executed

    General Code/Help
    1
    1
    33
    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.
    • H
      hwkhuen last edited by

      Hi there,

      I am new to backtrader and still learning.

      In my code, I submitted the order but it never got executed and I am not sure why.
      The order is only valid for the day session. The data feed is daily

                self.order = self.buy(exectype=bt.Order.Limit,
                                        price=self.strategy.entry,
                                        valid=bt.Order.DAY)
      

      Output
      2021-04-01, BUY CREATE, 71.37
      2021-04-05, Close, 72.04

      It should have executed as the ticker has Open (70.41), High (71.59), Low (69.28)

      Any advice?

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