public RenkoConsolidator(decimal barSize, RenkoType type) : this(barSize, true) { if (type != RenkoType.Classic) { throw new ArgumentException("Please use the WickedRenkoConsolidator type if RenkoType is not Classic"); } }
/// <summary> /// Initializes a new instance of the <see cref="RenkoConsolidator"/> class using the specified <paramref name="barSize"/>. /// </summary> /// <param name="barSize">The constant value size of each bar</param> /// <param name="type">The RenkoType of the bar</param> public RenkoConsolidator(decimal barSize, RenkoType type) { if (type != RenkoType.Wicked) throw new ArgumentOutOfRangeException("type"); _barSize = barSize; Type = type; }
/// <summary> /// Initializes a new instance of the <see cref="RenkoConsolidator"/> class using the specified <paramref name="barSize"/>. /// </summary> /// <param name="barSize">The constant value size of each bar</param> /// <param name="type">The RenkoType of the bar</param> public RenkoConsolidator(decimal barSize, RenkoType type) { if (type != RenkoType.Wicked) { throw new ArgumentException($"RenkoConsolidator can only be initialized with RenkoType.Wicked. For RenkoType.Classic, please use the other constructor overloads."); } _barSize = barSize; Type = type; }
/// <summary> /// Initializes a new instance of the <see cref="RenkoConsolidator"/> class using the specified <paramref name="barSize"/>. /// </summary> /// <param name="barSize">The constant value size of each bar</param> /// <param name="type">The RenkoType of the bar</param> public RenkoConsolidator(decimal barSize, RenkoType type) { if (type != RenkoType.Wicked) { throw new ArgumentOutOfRangeException("type"); } _barSize = barSize; Type = type; }