mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-18 18:48:05 +00:00
fix exception handling
This commit is contained in:
@@ -41,9 +41,7 @@ public sealed class Efi : AbstractBase
|
|||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
public Efi(int period = DefaultPeriod)
|
public Efi(int period = DefaultPeriod)
|
||||||
{
|
{
|
||||||
if (period < 1)
|
ArgumentOutOfRangeException.ThrowIfLessThan(period, 1);
|
||||||
throw new ArgumentOutOfRangeException(nameof(period));
|
|
||||||
|
|
||||||
_ema = new(period);
|
_ema = new(period);
|
||||||
WarmupPeriod = period + 1;
|
WarmupPeriod = period + 1;
|
||||||
Name = $"EFI({period})";
|
Name = $"EFI({period})";
|
||||||
|
|||||||
Reference in New Issue
Block a user