Navigation

    Backtrader Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. agserran
    For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/
    A
    • Profile
    • Following 0
    • Followers 0
    • Topics 5
    • Posts 5
    • Best 0
    • Groups 0

    agserran

    @agserran

    0
    Reputation
    309
    Profile views
    5
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    agserran Unfollow Follow

    Latest posts made by agserran

    • Interactive Brokers notify_order

      Hello,

      I am using Backtrader to trade live using the Interactive Brokers data feeds. When trading on a handful of data feeds, the notify_order method is called quickly and everything works according to the documentation. However, when I bump up my live data feeds to about 90, the notify_order method is never called most of the time but there has been times where it is called but extremely delayed (30 minutes after submitting and order and seeing that the order got filled on Interactive Brokers TWS). What can be the reason? It is a simple strategy where I just send buy/sell orders and wait for them to come through as order.Completed in the notify_order method to log the price at which it was executed at.

      Thank you

      posted in General Code/Help
      A
      agserran
    • Index Error in next()

      Hello,

      I am receiving the following error during live trading with Interactive Brokers. Can someone please tell me what may be the reason for it, thank you.

      0_1523559167687_Screenshot from 2018-04-12 11-52-37.png

      posted in General Code/Help
      A
      agserran
    • notify_order() Race Condition

      Hello,

      I am wondering, is it wrong to send orders inside the notify_order() method? During live trading, I wait for an entry order to be signalled as 'Complete' in the notify_order() method and immediately send 2 stop loss orders (one fixed and one trailing) but I noticed that notify_order() is never called again for those stop loss orders, more specifically I do not receive order 'Accepted' even though the orders show up on the live broker. The live broker I am using btw is Interactive Brokers. Should I not send these stop loss orders inside this method to allow it to be freed up?

      Thanks

      posted in General Code/Help
      A
      agserran
    • Trailing Stop Loss Type

      We want a trailing stop loss that has an initial stop loss distance eg. 1% from the fill price. But we only want the stop loss to begin trailing after the market has risen by .5%. Therefore, the stop loss has an initial stop loss distance AND a trailing stop loss distance. So there are two inputs. We are using Interactive Brokers through the Backtrader API, is there such a stop loss feature available? Also is there an option for a regular Stop Loss that will adjust to the fill price without having to calculate it before hand on the price we think we will get filled on? We are using Limit Orders and there have been cases where we have gotten filled at our Stop Loss, closing us out immediately.

      Thank you

      posted in General Code/Help
      A
      agserran
    • Interactive Brokers Order Rejected

      Hello,

      I am using Backtrader with Interactive Brokers as my strategies broker and I notice that I am receiving rejected orders more often than usual. I am sending bracket orders with a regular stop and a trailing stop. Since my entry order is a limit order it is possible for it to get filled in different parts at different prices so in the notify_order method I cancel my stop losses and resend two more that are based off of the filled price. Could this be the reason as to why I am getting Order.Rejected? On the Interactive Brokers software I can see that all parts of my bracket order went through and are being held in the system so I am confused as to why I am getting a rejected signal in Backtrader. Any feedback is appreciated, thanks.

      posted in General Code/Help
      A
      agserran