Backtrader Community

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

    fintrading

    @fintrading

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

    fintrading Unfollow Follow

    Best posts made by fintrading

    • RE: Print Trade (simple question)

      Hi,

      read up on Analyzers (https://www.backtrader.com/docu/analyzers/analyzers.html), especially https://www.backtrader.com/docu/analyzers-reference.html#tradeanalyzer and https://www.backtrader.com/docu/analyzers-reference.html#transactions.

      Basically you attach the analyzer(s) to the Cerebro instance, run the test and get the analyzers after the test is finished.

      posted in Indicators/Strategies/Analyzers
      F
      fintrading
    • RE: 4 hour time intervals

      @kreut said in 4 hour time intervals:

      You have to call self.datas[0].datetime.datetime(0) in your logging method:

      def log(self, txt, dt=None):
          ''' Logging function for this strategy'''
          dt = dt or self.datas[0].datetime.datetime(0)
          print('%s, %s' % (dt.strftime('%Y-%m-%d %H:%M:%S'), txt))
      posted in General Code/Help
      F
      fintrading

    Latest posts made by fintrading

    • RE: Print Trade (simple question)

      Hi,

      read up on Analyzers (https://www.backtrader.com/docu/analyzers/analyzers.html), especially https://www.backtrader.com/docu/analyzers-reference.html#tradeanalyzer and https://www.backtrader.com/docu/analyzers-reference.html#transactions.

      Basically you attach the analyzer(s) to the Cerebro instance, run the test and get the analyzers after the test is finished.

      posted in Indicators/Strategies/Analyzers
      F
      fintrading
    • RE: 4 hour time intervals

      @kreut said in 4 hour time intervals:

      You have to call self.datas[0].datetime.datetime(0) in your logging method:

      def log(self, txt, dt=None):
          ''' Logging function for this strategy'''
          dt = dt or self.datas[0].datetime.datetime(0)
          print('%s, %s' % (dt.strftime('%Y-%m-%d %H:%M:%S'), txt))
      posted in General Code/Help
      F
      fintrading