Navigation

    Backtrader Community

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

    John M

    @John M

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

    John M Unfollow Follow

    Latest posts made by John M

    • RE: Update plotline for talib indicator

      I also add the psar value to the line:

       self.lines.PSAR = self.psar
      
      posted in Indicators/Strategies/Analyzers
      John M
      John M
    • Update plotline for talib indicator

      I have defined the a psar indicator using the talib library. I am using talib as I want to use the value of an indicator for my feed instead of the default close price.

      lines = ('psar',)
      plotlines = dict(
                  psar=dict(
                      _name='psar', marker='.', markersize=4.0, color='black', fillstyle='full', ls=''
                  ),
              )
      
       self.psar = bt.talib.SAR(
                  self.rl, 
                  self.rl, 
                  acceleration=0.02, maximum=0.12,
                  plotname='PSAR',
              )
      

      but when I view the chart the values defined in the plotlines dict don't assign to the indicator. I get the default values from the talib module.

      I also tried to use: self.psar.plotlines = plotlines but this also did not take. I have been through the plotting docs but could not work this out.

      posted in Indicators/Strategies/Analyzers
      John M
      John M