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/

    Why buy/sell orders are not issued

    Indicators/Strategies/Analyzers
    3
    5
    82
    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.
    • Rok Petric
      Rok Petric last edited by

      Firs of all thank you for the awesome library, gret job done!

      I'm studying an example with SmaCross strategy from library. I use 10000$ investment cash and PercentSizer = 100 on TSLA stock . What I notice is that at some crossovers the buy order is not issued even though there's enough available cash, please see pic below where the courser is.

      Figure 0_315.png

      If I reduce the PercentSizer to 95, buy/sell orders seems fine. If I understand the sizer well (by def: This sizer returns percents of available cash), there's enough cash to buy many stocks at that point, so why the buy order is not issued?

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

        Since nothing is shown except the diagram, here ia the guess - 100% size was calculated based on the bar close price and order issued. Next bar open price was higher, therefore it was not enough cash to by the size and order was cancelled.

        Rok Petric Eduardo De La Garza 2 Replies Last reply Reply Quote 1
        • Rok Petric
          Rok Petric @ab_trader last edited by

          @ab_trader Thank you, that answers the question.

          1 Reply Last reply Reply Quote 0
          • Eduardo De La Garza
            Eduardo De La Garza @ab_trader last edited by

            @ab_trader Could this still be a problem if set_coc is set to True? Thanks.

            A 1 Reply Last reply Reply Quote 0
            • A
              ab_trader @Eduardo De La Garza last edited by

              @Eduardo-De-La-Garza I don't think so.

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