Closed shabbosgoy closed 6 years ago
Hello @shabbosgoy!
Would it be too much to ask if you could create a unit test with your exact issue in this thread? I can take your data as seed. But I would like to see the actual code you are using to replicate the issue.
Thanks!
static void ArghItHurts()
{
string jsonStr = "[0.00000397,0.00000398,0.00000399,0.00000399,0.00000398,0.00000398,0.00000398,0.00000399,0.00000397,0.00000398,0.00000397,0.00000399,0.00000398,0.00000397,0.00000398,0.00000398,0.00000398,0.00000398,0.00000398,0.00000398,0.00000398,0.00000398,0.00000397,0.00000398,0.00000398,0.00000398,0.00000397,0.00000397,0.00000397,0.00000398,0.00000398,0.00000397,0.00000398,0.00000398,0.00000398,0.00000398,0.00000398,0.00000397,0.00000397,0.00000397,0.00000397,0.00000397,0.00000398,0.00000397,0.00000398,0.00000397,0.00000397,0.00000398,0.00000397,0.00000398,0.00000398,0.00000397,0.00000397,0.00000397,0.00000398,0.00000396,0.00000396,0.00000397,0.00000396,0.00000396,0.00000395,0.00000396,0.00000396,0.00000395,0.00000396,0.00000396,0.00000396,0.00000396,0.00000396,0.00000396,0.00000396,0.00000396,0.00000395,0.00000395,0.00000394,0.00000393,0.00000393,0.00000394,0.00000393,0.00000393,0.00000393,0.00000394,0.00000393,0.00000394,0.00000393,0.00000392,0.00000393,0.00000392,0.00000394,0.00000395,0.00000394,0.00000395,0.00000395,0.00000395,0.00000394,0.00000394,0.00000393,0.00000391,0.00000391,0.00000391,0.00000392,0.00000390,0.00000391,0.00000389,0.00000390,0.00000389,0.00000389,0.00000390,0.00000389,0.00000388,0.00000388,0.00000389,0.00000388,0.00000389,0.00000392,0.00000394,0.00000395,0.00000395,0.00000394,0.00000395,0.00000395,0.00000394,0.00000394,0.00000394,0.00000393,0.00000391,0.00000391,0.00000391,0.00000389,0.00000389,0.00000388,0.00000390,0.00000389,0.00000389,0.00000393,0.00000392,0.00000392,0.00000392,0.00000392,0.00000392,0.00000392,0.00000392,0.00000392,0.00000391,0.00000393,0.00000393,0.00000392,0.00000393,0.00000394,0.00000393,0.00000394,0.00000393,0.00000392,0.00000392,0.00000392,0.00000391,0.00000392,0.00000391,0.00000392,0.00000391,0.00000391,0.00000391,0.00000392,0.00000392,0.00000393,0.00000394,0.00000393,0.00000394,0.00000393,0.00000394,0.00000393,0.00000395,0.00000394,0.00000394,0.00000394,0.00000394,0.00000394,0.00000393,0.00000394,0.00000395,0.00000393,0.00000394,0.00000394,0.00000393,0.00000394,0.00000392,0.00000393,0.00000392,0.00000392,0.00000392,0.00000393,0.00000392,0.00000393,0.00000392,0.00000393,0.00000393,0.00000393,0.00000393,0.00000392,0.00000392,0.00000392,0.00000393,0.00000393,0.00000393,0.00000392,0.00000392,0.00000392,0.00000392,0.00000392,0.00000392,0.00000392,0.00000391,0.00000391,0.00000392,0.00000391,0.00000392,0.00000391,0.00000391,0.00000391,0.00000391,0.00000391,0.00000391,0.00000391,0.00000391,0.00000391,0.00000391,0.00000390,0.00000390,0.00000391,0.00000390,0.00000390,0.00000389,0.00000390,0.00000390,0.00000390,0.00000390,0.00000391,0.00000391,0.00000391,0.00000390,0.00000390,0.00000390,0.00000391,0.00000391,0.00000391,0.00000390,0.00000390,0.00000390,0.00000390,0.00000390,0.00000391,0.00000392,0.00000391,0.00000393,0.00000393,0.00000393,0.00000394,0.00000393,0.00000392,0.00000394,0.00000392,0.00000393,0.00000393,0.00000391,0.00000393,0.00000393,0.00000392,0.00000392,0.00000393,0.00000391,0.00000392,0.00000392,0.00000391,0.00000391,0.00000393,0.00000392,0.00000392,0.00000392,0.00000393,0.00000393,0.00000392,0.00000392,0.00000392,0.00000393,0.00000392,0.00000393,0.00000392,0.00000392,0.00000393,0.00000393,0.00000393,0.00000394,0.00000393,0.00000393,0.00000394,0.00000393,0.00000393,0.00000392,0.00000393,0.00000393,0.00000393,0.00000393,0.00000394,0.00000393,0.00000392,0.00000393,0.00000393,0.00000394,0.00000393,0.00000392,0.00000393,0.00000392,0.00000393,0.00000393,0.00000392,0.00000393,0.00000393,0.00000392,0.00000393,0.00000393,0.00000393,0.00000392,0.00000392,0.00000393,0.00000392,0.00000393,0.00000392,0.00000393,0.00000391,0.00000392,0.00000392,0.00000393,0.00000392,0.00000392,0.00000393,0.00000392,0.00000392,0.00000393,0.00000392,0.00000393,0.00000392,0.00000393,0.00000392,0.00000392,0.00000393,0.00000392,0.00000391,0.00000392,0.00000392,0.00000392,0.00000392,0.00000392,0.00000392,0.00000392,0.00000392,0.00000392,0.00000393,0.00000392,0.00000393,0.00000392,0.00000393,0.00000392,0.00000393,0.00000392,0.00000392,0.00000391,0.00000393,0.00000392,0.00000393,0.00000393,0.00000393,0.00000392,0.00000392,0.00000392,0.00000392,0.00000392,0.00000392,0.00000393,0.00000393,0.00000392,0.00000393,0.00000393,0.00000392,0.00000392,0.00000392,0.00000393,0.00000393,0.00000394,0.00000393,0.00000394,0.00000393,0.00000393,0.00000394,0.00000394,0.00000394,0.00000394,0.00000393,0.00000394,0.00000394,0.00000393,0.00000392,0.00000394,0.00000393,0.00000392,0.00000393,0.00000393,0.00000394,0.00000394,0.00000393,0.00000393,0.00000393,0.00000393,0.00000393,0.00000393,0.00000393,0.00000392,0.00000393,0.00000393,0.00000392,0.00000393,0.00000392,0.00000392,0.00000393,0.00000392,0.00000392,0.00000393,0.00000393,0.00000392,0.00000391,0.00000392,0.00000391,0.00000391,0.00000392,0.00000392,0.00000392,0.00000391,0.00000391,0.00000392,0.00000391,0.00000392,0.00000391,0.00000390,0.00000392,0.00000391,0.00000392,0.00000391,0.00000391,0.00000392,0.00000392,0.00000391,0.00000392,0.00000391,0.00000391,0.00000391,0.00000391,0.00000392,0.00000392,0.00000391,0.00000392,0.00000390,0.00000391,0.00000391,0.00000392,0.00000392,0.00000392,0.00000392,0.00000391,0.00000391,0.00000391,0.00000391,0.00000391,0.00000392,0.00000392,0.00000392,0.00000391,0.00000392,0.00000393,0.00000393,0.00000393,0.00000392,0.00000392,0.00000392,0.00000393,0.00000392,0.00000393,0.00000392,0.00000393,0.00000393,0.00000393,0.00000393,0.00000393,0.00000393,0.00000393,0.00000393,0.00000394,0.00000393,0.00000393,0.00000394,0.00000393,0.00000393]";
List<decimal> inputs = JsonConvert.DeserializeObject<List<decimal>>(jsonStr);
RelativeStrengthIndexByTuple rsi = new RelativeStrengthIndexByTuple(inputs, 2); // 2 can be interchanged for 3 as well. 8 gives no errors
var rsiResults = rsi.Compute();
}
There ya go, I hope it helps. It seems to happen only when setting a smaller period. 2 and 3 seem to crash. 8 does not.
Hi @shabbosgoy , I've tried the test code on v3.1 branch and it works perfectly on my machine. The version of the branch should be equivalent to v3.1.0-beta1 on nuget, please try that version and see if the bug is fixed. Thanks.
The issue is no longer active, close.
Hi!
First of all: thanks for making this lib! It saves me a ton of time.
However, I am getting an error computing the RSI by tuple on the following decimal array: https://pastebin.com/ZFDwtqeb
I am using .NET Framework 4.7, 64-bit on Win10