Backtrader Community

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. Kas David
    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 4
    • Posts 6
    • Best 0
    • Controversial 0
    • Groups 0

    Kas David

    @Kas David

    0
    Reputation
    112
    Profile views
    6
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    Kas David Unfollow Follow

    Latest posts made by Kas David

    • Importing Data from memory - not file/csv/pd

      How do I import data from memory?

      I already have it in a list.
      Don't want to write it out to file/csv, nor want to use huge panda lib.

      [
      (datetime_obj, close_price_float), 
      (datetime_obj, close_price_float),
      (datetime_obj, close_price_float),
      ]
      

      Cheers

      posted in General Code/Help
      Kas David
      Kas David
    • RE: How to set strategy's member externally

      Cool works for me, thanks.

      class firstStrategy(bt.Strategy):
          params = (
              ('period',21),
              )
         x= self.params.period
      
      cerebro.addstrategy(firstStrategy, period=14)
      
      posted in General Discussion
      Kas David
      Kas David
    • How to set strategy's member externally

      How can I externally set a private member inside a strategy?

      class strategy(bt.Strategy):
        def __init__(self):
          self.title = "how to set this externally?"
      
      cerebro.addstrategy(strategy) # using strategy
      
      cerebro.strategy.setTitle("new title")
      
      posted in General Discussion
      Kas David
      Kas David
    • ssl-channel-chart indicator wanted

      Hello,
      Does anyone have this indicator ported to backtrader?
      http://www.mq4.best-metatrader-indicators.com/ssl-channel-chart-alert-indicator.zip

      Cheers,

      posted in Indicators/Strategies/Analyzers
      Kas David
      Kas David
    • RE: Plotting debug lines

      @backtrader
      Hmm, what's the next simplest thing I can do?

      posted in Indicators/Strategies/Analyzers
      Kas David
      Kas David
    • Plotting debug lines

      Hi, I'm new to backtrader, what's the simples way to plot debug lines?
      eg. I want to display intermediate information based on an indicator, if possible without writing classes.

      strategy:
      def next(self):
          if self.adx[0] < 25:
            plot_addPoint(-1) # no trend
          else:
            plot_addPoint(1) # ongoing trend
      
      posted in Indicators/Strategies/Analyzers
      Kas David
      Kas David