title: Python TA-Lib abstract API usage
body: <p>I've had a look at the module documentation for <strong>TA-Lib</strong> as well as the <a href="http://mrjbq7.github.io/ta-lib/abstract.html" rel="nofollow">abstract-specific guide</a>, yet I am still unclear as to what exactly the <strong>abstract API</strong> can do for me (and how). Specifically, I would like to see a <strong>Python code example</strong> that instantiates a custom indicator which maintains indicator value state and periodically calculates, say, RSI from an individual input value, as opposed to an array of input values.</p>
  
  <p>What I envision is the ability to pass values to an indicator sequentially (as they become available), so for example, instead of maintaining a numpy array of 700 items to calculate RSI on 5 minute candles - every 5 minutes - I wonder if it is possible to pass an abstract indicator function the candle close price, once every 5 minutes, and for it to output the 14-period RSI value calculated from state. This would be better suited to my application which keeps track of 9 different indicator values for 5 different timeframes indefinitely and around the clock. </p>
  
  <p>Whilst numpy arrays are convenient for generating once-off indicator value arrays, a live system with ongoing indicator calculations would be more easily maintained and more memory efficient were the TA-Lib object to maintain indicator state somehow. Is this something the abstract API can do?</p>
  
  <p>If not, I see an <strong>alternative</strong> in having a <strong>rotating deque</strong> (of 14 items - the RSI period) which can serve as input to the abstract indicator. A code example of <strong>custom data</strong> type implementation via TA-Lib abstract would be appreciated.</p>