Backtrader Community

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

    amir mansoubi

    @amir mansoubi

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

    amir mansoubi Unfollow Follow

    Latest posts made by amir mansoubi

    • RE: Backtrader doesn't receives data from TWS after a few hours of running

      @vladisld
      Unfortunately, it was unchecked in settings.
      I enabled it and will send the log next time thr problem happens.

      posted in General Code/Help
      amir mansoubi
      amir mansoubi
    • RE: Backtrader doesn't receives data from TWS after a few hours of running

      @vladisld thanks for answering.

      Actually, I use IB GATEWAY which doesn't have any API log. But there is a Gateway log for the day.
      Is it useful?

      posted in General Code/Help
      amir mansoubi
      amir mansoubi
    • Backtrader doesn't receives data from TWS after a few hours of running

      Hi everyone!

      I have some problems in passing the right params to Cerebro, store, and feed.

      I need to trade US futures (for example 30 of them) with my custom strategy, live at IB.
      TRADES and sometimes BID_ASK data are used.
      Also, I need next() to be called every minute regardless of data is received completely or not, As I have some big problems making TWS work properly.
      Adding to this, backfilling at the start is desirable.

      My resampledata() input params are like this now:

      • rtbar=True

      • historical=False

      • backfill_start=True

      • backfill=True

      Now it works for a few hours continuously and then suddenly it stops, while TWS is running and datas are CONNECTED and also the script is running but next() is not called.

      So what should I change? Is there any major change needed?

      posted in General Code/Help
      amir mansoubi
      amir mansoubi
    • RE: order is completed but no trade notified!

      Thanks for answering.
      Finally, I found out that trades are completed only when the position of the asset turns 0.
      Thanks again.

      posted in General Code/Help
      amir mansoubi
      amir mansoubi
    • order is completed but no trade notified!

      Hi everyone!
      I'm new to backtrader.

      I use a customized strategy with a .csv file.
      At the end of running, there are about 30000 COMPLETED order but just 4 trades!
      I mean I really buy and sell and the positions and cash changes during the running time but many of the orders complete without the creation of any order.
      And because of that, all analyzers are useless. :(

      Please help me. I need analyzers results containing 30000 trades, not just 4.

      posted in General Code/Help trade trades analyzer
      amir mansoubi
      amir mansoubi