/// <summary>
        /// Initializes a new instance of the <see cref="BiggerTimeFrameCandleCompressor"/>.
        /// </summary>
        /// <param name="subscription">Market-data message (uses as a subscribe/unsubscribe in outgoing case, confirmation event in incoming case).</param>
        public BiggerTimeFrameCandleCompressor(MarketDataMessage subscription)
        {
            if (subscription == null)
            {
                throw new ArgumentNullException(nameof(subscription));
            }

            _subscription = subscription;
            _transform    = new PartCandleBuilderValueTransform();
            _builder      = new TimeFrameCandleBuilder();
        }
Beispiel #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="BiggerTimeFrameCandleCompressor"/>.
        /// </summary>
        /// <param name="mdMsg">Market-data message (uses as a subscribe/unsubscribe in outgoing case, confirmation event in incoming case).</param>
        public BiggerTimeFrameCandleCompressor(MarketDataMessage mdMsg)
        {
            if (mdMsg == null)
            {
                throw new ArgumentNullException(nameof(mdMsg));
            }

            _mdMsg     = mdMsg;
            _transform = new PartCandleBuilderValueTransform();
            _builder   = new TimeFrameCandleBuilder();
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="BiggerTimeFrameCandleCompressor"/>.
 /// </summary>
 /// <param name="message">Market-data message (uses as a subscribe/unsubscribe in outgoing case, confirmation event in incoming case).</param>
 /// <param name="builder">The builder of candles of <see cref="TimeFrameCandleMessage"/> type.</param>
 public BiggerTimeFrameCandleCompressor(MarketDataMessage message, ICandleBuilder builder)
 {
     Message    = message ?? throw new ArgumentNullException(nameof(message));
     _transform = new PartCandleBuilderValueTransform();
     _builder   = builder ?? throw new ArgumentNullException(nameof(builder));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="BiggerTimeFrameCandleCompressor"/>.
 /// </summary>
 /// <param name="subscription">Market-data message (uses as a subscribe/unsubscribe in outgoing case, confirmation event in incoming case).</param>
 /// <param name="builder">The builder of candles of <see cref="TimeFrameCandleMessage"/> type.</param>
 public BiggerTimeFrameCandleCompressor(MarketDataMessage subscription, ICandleBuilder builder)
 {
     _subscription = subscription ?? throw new ArgumentNullException(nameof(subscription));
     _transform    = new PartCandleBuilderValueTransform();
     _builder      = builder ?? throw new ArgumentNullException(nameof(builder));
 }