Navigation

    Backtrader Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/

    cant plot talib candle-patterns when loading a pandas datafeed

    General Code/Help
    1
    1
    256
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • greg nwosu
      greg nwosu last edited by greg nwosu

      my ta-lib pattern analysis doesn't plot whenever I load from the pandas, all information below. what have i done wrong, everything plots. if i use a different data source with the same strategy i get i lots of doji appearing? any ideas?
      0_1558282703389_cde1df7a-6e71-455f-863a-4ac5d320d8e9-image.png

      any ideas pandas dataframe looks like the following

      0   2012-02-26 22:00:00  1.205290  1.204820  1.205455  1.204170  190152802           0.0
      1   2012-02-26 23:00:00  1.204820  1.204560  1.204930  1.204475  190250588           0.0
      2   2012-02-27 00:00:00  1.204560  1.204520  1.205005  1.204330  104510380           0.0
      3   2012-02-27 01:00:00  1.204520  1.205050  1.205155  1.204425  174126767           0.0
      4   2012-02-27 02:00:00  1.205050  1.204940  1.205185  1.204770  208614900           0.0
      5   2012-02-27 03:00:00  1.204940  1.205035  1.205380  1.204810   98779156           0.0
      6   2012-02-27 04:00:00  1.205035  1.204985  1.205495  1.204920  282350605           0.0
      7   2012-02-27 05:00:00  1.204985  1.204600  1.204985  1.204595  252321927           0.0
      8   2012-02-27 06:00:00  1.204600  1.204690  1.204695  1.204355   61992656           0.0
      9   2012-02-27 07:00:00  1.204690  1.204820  1.205080  1.204515  208568246           0.0
      10  2012-02-27 08:00:00  1.204820  1.204960  1.205270  1.204485  298878579           0.0
      11  2012-02-27 09:00:00  1.204960  1.204945  1.204990  1.204750  255030136           0.0
      12  2012-02-27 10:00:00  1.204945  1.205000  1.205250  1.204860   79796987           0.0
      13  2012-02-27 11:00:00  1.205000  1.205090  1.205260  1.204880  144219484           0.0
      14  2012-02-27 12:00:00  1.205090  1.205125  1.205185  1.204780  134824312           0.0
      15  2012-02-27 13:00:00  1.205125  1.204915  1.205245  1.204820  238094712           0.0
      16  2012-02-27 14:00:00  1.204915  1.204665  1.204940  1.204300  251955842           0.0
      17  2012-02-27 15:00:00  1.204665  1.204940  1.205015  1.204355   85881004           0.0
      18  2012-02-27 16:00:00  1.204940  1.205235  1.205485  1.204805  125955185           0.0
      19  2012-02-27 17:00:00  1.205235  1.205045  1.205375  1.204745  283341316           0.0
      20  2012-02-27 18:00:00  1.205045  1.204885  1.205290  1.204750  255930051           0.0
      21  2012-02-27 19:00:00  1.204885  1.205395  1.205445  1.204840  221327896           0.0
      22  2012-02-27 20:00:00  1.205395  1.205270  1.205550  1.205095  185643117           0.0
      23  2012-02-27 21:00:00  1.205270  1.204980  1.205550  1.204805  147470489           0.0
      24  2012-02-27 22:00:00  1.204980  1.205160  1.205345  1.204750  181415774           0.0
      25  2012-02-27 23:00:00  1.205160  1.204840  1.205315  1.204770  149032685           0.0
      26  2012-02-28 00:00:00  1.204840  1.204795  1.205030  1.204725  110546980           0.0
      27  2012-02-28 01:00:00  1.204795  1.205245  1.205270  1.204760   60523347           0.0
      28  2012-02-28 02:00:00  1.205245  1.205170  1.205375  1.205125  162474371           0.0
      29  2012-02-28 03:00:00  1.205170  1.205265  1.205360  1.205100  291936399           0.0
      30  2012-02-28 04:00:00  1.205265  1.205430  1.205555  1.205140  227560683           0.0
      31  2012-02-28 05:00:00  1.205430  1.205540  1.205660  1.205195  240650632           0.0
      32  2012-02-28 06:00:00  1.205540  1.205595  1.205760  1.205290  186622640           0.0
      33  2012-02-28 07:00:00  1.205595  1.205430  1.205910  1.204850  206603440           0.0
      34  2012-02-28 08:00:00  1.205430  1.204965  1.205500  1.204875   57688580           0.0
      35  2012-02-28 09:00:00  1.204965  1.205535  1.205590  1.204855  151666441           0.0
      36  2012-02-28 10:00:00  1.205535  1.205160  1.205610  1.204970  209278948           0.0
      37  2012-02-28 11:00:00  1.205160  1.205150  1.205225  1.205040  130689760           0.0
      38  2012-02-28 12:00:00  1.205150  1.205215  1.205240  1.205025   55238997           0.0
      39  2012-02-28 13:00:00  1.205215  1.205180  1.205395  1.204790  158739116           0.0
      40  2012-02-28 14:00:00  1.205180  1.205180  1.205405  1.204980  102105107           0.0
      41  2012-02-28 15:00:00  1.205180  1.205065  1.205380  1.204990  230186256           0.0
      42  2012-02-28 16:00:00  1.205065  1.205490  1.205630  1.204990  168074860           0.0
      43  2012-02-28 17:00:00  1.205490  1.205275  1.205585  1.205225  174359680           0.0
      44  2012-02-28 18:00:00  1.205275  1.205055  1.205515  1.204970  118561247           0.0
      45  2012-02-28 19:00:00  1.205055  1.205090  1.205140  1.204955  102920342           0.0
      46  2012-02-28 20:00:00  1.205090  1.205065  1.205145  1.204970   85136424           0.0
      47  2012-02-28 21:00:00  1.205065  1.205220  1.205490  1.205005  273700228           0.0
      48  2012-02-28 22:00:00  1.205220  1.205360  1.205555  1.204965   95385437           0.0
      49  2012-02-28 23:00:00  1.205360  1.205395  1.205480  1.205165  128468635           0.0
      50  2012-02-29 00:00:00  1.205395  1.205255  1.205415  1.205180  214338263           0.0
      51  2012-02-29 01:00:00  1.205255  1.205395  1.205455  1.205150  187221781           0.0
      52  2012-02-29 02:00:00  1.205395  1.205535  1.205660  1.205325   52632744           0.0
      53  2012-02-29 03:00:00  1.205535  1.205350  1.205535  1.205305  130055307           0.0
      54  2012-02-29 04:00:00  1.205350  1.205205  1.205575  1.205145  229421296           0.0
      55  2012-02-29 05:00:00  1.205205  1.205300  1.205460  1.205065  268776564           0.0
      56  2012-02-29 06:00:00  1.205300  1.205080  1.205360  1.205055  134701259           0.0
      57  2012-02-29 07:00:00  1.205080  1.205310  1.205485  1.205050  206685994           0.0
      58  2012-02-29 08:00:00  1.205310  1.205190  1.205350  1.205020  129363728           0.0
      59  2012-02-29 09:00:00  1.205190  1.205340  1.205420  1.205060  233904836           0.0
      60  2012-02-29 10:00:00  1.205340  1.205140  1.205545  1.205070  108336119           0.0
      61  2012-02-29 11:00:00  1.205140  1.205230  1.205350  1.205035   91930334           0.0
      62  2012-02-29 12:00:00  1.205230  1.205095  1.205285  1.205030   77004487           0.0
      63  2012-02-29 13:00:00  1.205095  1.205055  1.205275  1.204855  176201450           0.0
      64  2012-02-29 14:00:00  1.205055  1.205300  1.205320  1.204940  124509279           0.0
      65  2012-02-29 15:00:00  1.205300  1.205100  1.205590  1.205070  108746691           0.0
      66  2012-02-29 16:00:00  1.205100  1.205320  1.205430  1.204710  140671667           0.0
      67  2012-02-29 17:00:00  1.205320  1.205370  1.205435  1.204995  248242356           0.0
      68  2012-02-29 18:00:00  1.205370  1.205450  1.205695  1.205275  179587854           0.0
      69  2012-02-29 19:00:00  1.205450  1.205285  1.205615  1.205130  241645486           0.0
      70  2012-02-29 20:00:00  1.205285  1.205390  1.205505  1.205160  243291499           0.0
      71  2012-02-29 21:00:00  1.205390  1.205240  1.205395  1.205085  135900280           0.0
      72  2012-02-29 22:00:00  1.205240  1.205280  1.205645  1.205130  118791474           0.0
      73  2012-02-29 23:00:00  1.205280  1.205470  1.205520  1.205145  291931033           0.0
      74  2012-03-01 00:00:00  1.205470  1.205410  1.205515  1.205185  119325419           0.0
      75  2012-03-01 01:00:00  1.205410  1.205505  1.205620  1.205310   78077252           0.0
      76  2012-03-01 02:00:00  1.205505  1.205790  1.205875  1.205415  238399691           0.0
      77  2012-03-01 03:00:00  1.205790  1.205460  1.205805  1.205340   58280462           0.0
      78  2012-03-01 04:00:00  1.205460  1.205170  1.205645  1.205060  209316435           0.0
      79  2012-03-01 05:00:00  1.205170  1.205245  1.205270  1.204910  145436578           0.0
      80  2012-03-01 06:00:00  1.205245  1.205280  1.205435  1.205095  273789557           0.0
      81  2012-03-01 07:00:00  1.205280  1.205350  1.205660  1.205220  133842775           0.0
      82  2012-03-01 08:00:00  1.205350  1.205220  1.205450  1.205085  113351757           0.0
      83  2012-03-01 09:00:00  1.205220  1.205280  1.205350  1.205095  168622686           0.0
      84  2012-03-01 10:00:00  1.205280  1.205390  1.205450  1.205200  173150581           0.0
      85  2012-03-01 11:00:00  1.205390  1.205605  1.205675  1.205355  154962732           0.0
      86  2012-03-01 12:00:00  1.205605  1.205350  1.205705  1.205290  216542091           0.0
      87  2012-03-01 13:00:00  1.205350  1.205075  1.205430  1.204970   83567042           0.0
      88  2012-03-01 14:00:00  1.205075  1.204900  1.205205  1.204770  191567494           0.0
      89  2012-03-01 15:00:00  1.204900  1.205315  1.205380  1.204725  265076645           0.0
      90  2012-03-01 16:00:00  1.205315  1.205485  1.205575  1.205210  284249730           0.0
      91  2012-03-01 17:00:00  1.205485  1.205680  1.205780  1.205410  154145184           0.0
      92  2012-03-01 18:00:00  1.205680  1.206165  1.206190  1.205640  103285448           0.0
      93  2012-03-01 19:00:00  1.206165  1.206190  1.206430  1.205950  103807365           0.0
      94  2012-03-01 20:00:00  1.206190  1.205940  1.206220  1.205780  110408375           0.0
      95  2012-03-01 21:00:00  1.205940  1.205965  1.206330  1.205820  149184006           0.0
      96  2012-03-01 22:00:00  1.205965  1.206045  1.206285  1.205650  196489690           0.0
      97  2012-03-01 23:00:00  1.206045  1.206130  1.206200  1.205835  258795002           0.0
      98  2012-03-02 00:00:00  1.206130  1.206130  1.206340  1.205905   61859885           0.0
      99  2012-03-02 01:00:00  1.206130  1.206540  1.206625  1.206035  257107947           0.0
      100 2012-03-02 02:00:00  1.206540  1.206630  1.206690  1.206160  248751297           0.0
      101 2012-03-02 03:00:00  1.206630  1.206775  1.206920  1.206480   50147000           0.0
      102 2012-03-02 04:00:00  1.206775  1.206660  1.206970  1.206585  211666693           0.0
      103 2012-03-02 05:00:00  1.206660  1.206410  1.206720  1.206305  190284371           0.0
      104 2012-03-02 06:00:00  1.206410  1.206505  1.206550  1.206170  140172502           0.0
      105 2012-03-02 07:00:00  1.206505  1.206080  1.206670  1.205820  188495606           0.0
      106 2012-03-02 08:00:00  1.206080  1.205840  1.206220  1.205445   88449590           0.0
      107 2012-03-02 09:00:00  1.205840  1.205425  1.206215  1.205330  229167697           0.0
      108 2012-03-02 10:00:00  1.205425  1.205500  1.205665  1.205265   55678638           0.0
      109 2012-03-02 11:00:00  1.205500  1.205700  1.205760  1.205500  242065779           0.0
      110 2012-03-02 12:00:00  1.205700  1.206160  1.206775  1.205680  181068926           0.0
      111 2012-03-02 13:00:00  1.206160  1.206810  1.206920  1.206105   86585467           0.0
      112 2012-03-02 14:00:00  1.206810  1.206435  1.206880  1.206110  291073327           0.0
      113 2012-03-02 15:00:00  1.206435  1.205885  1.206795  1.205755  118116316           0.0
      114 2012-03-02 16:00:00  1.205885  1.205855  1.206195  1.205690  118752650           0.0
      115 2012-03-02 17:00:00  1.205855  1.206790  1.207000  1.205835   55669134           0.0
      116 2012-03-02 18:00:00  1.206790  1.206550  1.206800  1.206395  155359747           0.0
      117 2012-03-02 19:00:00  1.206550  1.206565  1.206825  1.206425   89038834           0.0
      118 2012-03-02 20:00:00  1.206565  1.206565  1.206755  1.206340  166606248           0.0
      119 2012-03-02 21:00:00  1.206565  1.206695  1.207005  1.206375   61317528           0.0
      

      dataframe structure from df.info()

      <class 'pandas.core.frame.DataFrame'>
      Int64Index: 120 entries, 0 to 119
      Data columns (total 7 columns):
      datetime        120 non-null datetime64[ns]
      open            120 non-null float64
      close           120 non-null float64
      high            120 non-null float64
      low             120 non-null float64
      volume          120 non-null int64
      openinterest    120 non-null float64
      dtypes: datetime64[ns](1), float64(5), int64(1)
      memory usage: 7.5 KB
      

      Starting Portfolio Value: 100000.00
      Final Portfolio Value: 100000.00

      1 Reply Last reply Reply Quote 0
      • 1 / 1
      • First post
        Last post
      Copyright © 2016, 2017, 2018, 2019, 2020, 2021 NodeBB Forums | Contributors