Navigation

    Backtrader Community

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

    ezfine

    @ezfine

    1
    Reputation
    113
    Profile views
    6
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    ezfine Unfollow Follow

    Best posts made by ezfine

    • RE: How to get datetime list from an indicator

      Thanks.
      Right now I can very easy to get such line with:

      [dt.fromordinal(int(v)) for v in ind.data.datetime.array]
      
      posted in Indicators/Strategies/Analyzers
      E
      ezfine

    Latest posts made by ezfine

    • Cerebro plot doesn't show the 'Cross' mouse pointer

      As we can see in the cerebro plot sample below, there should be a 'cross' mark moving with mouse pointer,

      32b70fc0-4afe-404c-b922-fa294cebbaf2-image.png

      However, in my work with PyCharm IDE, I can get the figure as below but no such 'cross' mark pointer, why? This issue bother me a long time. Any comment is very appreciated.

      3241b641-ecc4-46d7-ac02-0a215e2e2194-image.png

      posted in General Discussion
      E
      ezfine
    • RE: How to get datetime list from an indicator

      Thanks.
      Right now I can very easy to get such line with:

      [dt.fromordinal(int(v)) for v in ind.data.datetime.array]
      
      posted in Indicators/Strategies/Analyzers
      E
      ezfine
    • How to get datetime list from an indicator

      Reason to get such line is to export all data lines of an indicator to a DataFrame for checking data correctness, described as here

      Thanks in advance.

      posted in Indicators/Strategies/Analyzers
      E
      ezfine
    • RE: How to get each line name in the indicator

      Thanks. I can get the name list and then using _getline('name') to fetch the line object.
      By the way, I find it's not easy to get the datetime series from the indicator instance, how can I do?

      posted in General Discussion
      E
      ezfine
    • RE: How to get each line name in the indicator

      All lines in the indicator are for computing the signals, I need to dump them out for checking if there is any computing error. My idea is to dump them to a DataFrame with date as index and each line as column.

      posted in General Discussion
      E
      ezfine
    • How to get each line name in the indicator

      Say that an indicator sample as below:

      class MyIndicator(bt.indicator):
          lines = ('mva1', 'mva2')
      
          def __init__(self):
               self.l.mav1 = ....
               self.l.mav2 = ....
      

      My question here is how to get the names, 'mva1' 'mva2', from the existed MyIndicator? I would like to iterate myindicator.lines to get the names but it seems no such attribute, any idea?

      posted in General Discussion
      E
      ezfine