mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-22 12:38:06 +00:00
Update RSI_Series to check for period != 0 before calculating RSI
This commit is contained in:
@@ -388,7 +388,7 @@ public class Ta_Lib
|
||||
[Fact]
|
||||
public void SUM()
|
||||
{
|
||||
SUM_Series QL = new(bars.Close, period, false);
|
||||
CUSUM_Series QL = new(bars.Close, period, false);
|
||||
Core.Sum(inclose, 0, bars.Count - 1, TALIB, out int outBegIdx, out _, period);
|
||||
for (int i = QL.Length - 1; i > skip; i--)
|
||||
{
|
||||
|
||||
@@ -426,7 +426,7 @@ public class Tulip_Test
|
||||
public void SUM() {
|
||||
double[][] arrin = { inclose };
|
||||
double[][] arrout = { outdata };
|
||||
SUM_Series QL = new(bars.Close, period, false);
|
||||
CUSUM_Series QL = new(bars.Close, period, false);
|
||||
Tulip.Indicators.sum.Run(inputs: arrin, options: new double[] { period }, outputs: arrout);
|
||||
for (int i = QL.Length - 1; i > skip; i--) {
|
||||
double QL_item = QL[i].v;
|
||||
|
||||
Reference in New Issue
Block a user