Navigation

    Backtrader Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. HomunculusK
    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 2
    • Best 0
    • Groups 0

    HomunculusK

    @HomunculusK

    0
    Reputation
    10
    Profile views
    2
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    HomunculusK Unfollow Follow

    Latest posts made by HomunculusK

    • How to ignore 2 headers in a GenericCSV

      Screenshot_2.png
      I've got headers on True but it seems to only ignore the first header and read 'Date' as an actual data

      posted in General Code/Help
      HomunculusK
      HomunculusK
    • How can I use my strategy

      I've backtested it across multiple stocks and in bull and bear market and it seems pretty good now I wanna paper trade it, I made it write the last order for a stock (Buy or sell) to a csv but the problem is it could be a sell signal but from 2 weeks ago, and I can't limit the date from the data feed because I need exponential averages

      my questions are
      is there a way I could call the signal my strategy produces for today for example so I can send it to my csv
      or simply how can I get the signals any other way for today

              if not self.position:
                  if self.buysell_sig < 0:
                      df2.loc[symbol] = ['BUY']
                      self.order = self.buy()
      
              else:
                  if self.buysell_sig > 0:
                      df2.loc[symbol] = ['SELL']
                      self.order = self.sell()
      

      this is what I'm doing right now, it gets the last order so it can be a buy signal that never closed from a month ago

      posted in General Code/Help
      HomunculusK
      HomunculusK