Backtrader Community

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

    Xerxes

    @Xerxes

    0
    Reputation
    1
    Profile views
    1
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    Xerxes Unfollow Follow

    Latest posts made by Xerxes

    • Bracket Orders open trades with open prices.

      i use bracket order to put buy stop(above current price) and sell stop(below current price) orders.
      It ignores entry price i pass into it and use open price of bars.

      brackets = self.buy_bracket(limitprice=tp, price=entry, stopprice=sl)
      brackets = self.sell_bracket(limitprice=tp, price=entry, stopprice=sl)
      

      one output be like:

      1995-08-29, 166, Long at 2.72, TP: 2.975, SL: 2.55
      1995-08-30, 167, BUY EXECUTED, Price: 2.68, Cost: 16750.00, Comm 16.75
      1995-08-30, 167, Close: 2.63, Open: 2.68
      

      i tired exectype argument with its different values(bt.Order.Limit, bt.Order.Stop) but same result.

      posted in General Discussion
      X
      Xerxes