Navigation

    Backtrader Community

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

    azohar

    @azohar

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

    azohar Unfollow Follow

    Latest posts made by azohar

    • Pass ZeroLag indicator output as input to RSI

      Hello, I am trying to create an indicator that takes the output of the ZeroLagIndicator and passes it to RSI as the input, tried several ways but can't figure out how to correctly pass the data between them.

      When I run the code example I can see the correct value for zerolag[0] printed out, but nan for RSI.
      Like so:
      zerolag[0]=3646.76
      rsi[0]=nan

      class MyIndicator(bt.Indicator):
          def __init__(self, data):
              self.zerolag = bt.indicators.ZeroLagIndicator(
                  data,)
              self.rsi = bt.indicators.RSI(self.zerolag, period=5)
      
          def next(self):
              print("zerolag[0]=" + str(self.zerolag[0]))
              print("rsi[0]=" + str(self.rsi[0]))
      

      What is the correct way of doing this? Any help would be highly appreciated.

      posted in General Discussion
      A
      azohar
    • RE: TradeStation Live support for Backtrader

      Hi Maor and Joel,

      Similar interest here, willing to collaborate on this.

      posted in General Code/Help
      A
      azohar