title: .NET: Can't get correct RSI and MACD values from TA-Lib
body: <p>I'm trying to use TA-Lib for technical analysis. I downloaded TA-Lib-Core Nuget package for .NET. Unfortunately, I can't find any API documentation so some method parameters are a bit of mystery.</p>
  
  <p>I downloaded historical data for AMD between 4/12/2016 and 4/12/2017 <a href="http://finance.yahoo.com/quote/AMD/history?ltr=1" rel="nofollow noreferrer">here</a>.</p>
  
  <p>This is what I have for RSI and MACD calculations:</p>
  
  <pre><code>int outBegIdx1, outNBElement1;
  double[] outReal = new double[data.Count];
  
  int outBegIdx2, outNBElement2;
  double[] outMACD = new double[data.Count];
  double[] outMACDSignal = new double[data.Count];
  double[] outMACDHist = new double[data.Count];
  
  TicTacTec.TA.Library.Core.Rsi(0, data.Count - 1, data.Select(x =&gt; x.Close).ToArray(), 14, out outBegIdx1, out outNBElement1, outReal);
  TicTacTec.TA.Library.Core.Macd(0, data.Count - 1, data.Select(x =&gt; (float)x.Close).ToArray(), 12, 26, 9, out outBegIdx2, out outNBElement2, outMACD, outMACDSignal, outMACDHist);
  </code></pre>
  
  <p>I'm comparing the results to TradingView's AMD page <a href="https://www.tradingview.com/chart/?symbol=AMD" rel="nofollow noreferrer">here</a>. To see RSI and MACD values, please click "Indicators" at the top and select those. Also you should be looking at the 1 year daily chart.</p>
  
  <p>The problem is TA-Lib is outputting vastly different results, and I'm not sure if I'm using these APIs correctly. What I'm seeing is 65.34 for RSI and 0.0431 for MACD Histogram as opposed to TradingView's 39.42 and -0.2165 respectively.</p>
  
  <p>Please note that <code>data[0]</code> has the close price for 4/12/2016 whereas the last element is for 4/12/2017. Also I have no idea what <code>outBegIdx</code>and <code>outNBElement</code> parameters stand for. </p>
  
  <p>How do I return correct values?</p>