コード例 #1
0
        /// <summary>
        /// Deserialization constructor.
        /// </summary>
        public ProviderTradeChartSeries(SerializationInfo info, StreamingContext context)
            : base(info, context)
        {
            _showOrderArrow = info.GetBoolean("showOrderArrow");
            _showOrderSpot = info.GetBoolean("showOrderSpot");
            _showClosedOrdersTracing = info.GetBoolean("showClosedOrdersTracing");
            _showPendingOrdersTracing = info.GetBoolean("showPendingOrdersTracing");

            _buyDashedPen = (Pen)info.GetValue("buyDashedPen", typeof(Pen));
            _sellDashedPen = (Pen)info.GetValue("sellDashedPen", typeof(Pen));

            _showCurrentAskLine = info.GetBoolean("showCurrentAskLine");
            _showCurrentBidLine = info.GetBoolean("showCurrentBidLine");

            _priceLevelPen = (Pen)info.GetValue("priceLevelPen", typeof(Pen));

            _lineDrawingSource = (DataBar.DataValueEnum)info.GetInt32("lineDrawingSource");
        }
コード例 #2
0
        /// <summary>
        /// Deserialization constructor.
        /// </summary>
        public ProviderTradeChartSeries(SerializationInfo info, StreamingContext context)
            : base(info, context)
        {
            _showOrderArrow           = info.GetBoolean("showOrderArrow");
            _showOrderSpot            = info.GetBoolean("showOrderSpot");
            _showClosedOrdersTracing  = info.GetBoolean("showClosedOrdersTracing");
            _showPendingOrdersTracing = info.GetBoolean("showPendingOrdersTracing");

            _buyDashedPen  = (Pen)info.GetValue("buyDashedPen", typeof(Pen));
            _sellDashedPen = (Pen)info.GetValue("sellDashedPen", typeof(Pen));

            _showCurrentAskLine = info.GetBoolean("showCurrentAskLine");
            _showCurrentBidLine = info.GetBoolean("showCurrentBidLine");

            _priceLevelPen = (Pen)info.GetValue("priceLevelPen", typeof(Pen));

            _lineDrawingSource = (DataBar.DataValueEnum)info.GetInt32("lineDrawingSource");
        }
コード例 #3
0
        public double[] GetValuesAsDouble(DataBar.DataValueEnum valueEnum, int startingIndex, int indexCount)
        {
            double[] result;
            lock (this)
            {
                int count = indexCount;
                if (count == 0)
                {
                    count = _dataBars.Count - startingIndex;
                    GeneralHelper.Verify(count >= 0, "Invalid starting index.");
                }

                result = new double[Math.Min(count, _dataBars.Count)];
                for (int i = startingIndex; i < startingIndex + count && i < _dataBars.Count; i++)
                {
                    result[i - startingIndex] = (double)_dataBars[i].GetValue(valueEnum);
                }
            }

            return(result);
        }
コード例 #4
0
 public double[] GetValuesAsDouble(DataBar.DataValueEnum valueEnum)
 {
     return(GetValuesAsDouble(valueEnum, 0, int.MaxValue));
 }
コード例 #5
0
 public decimal[] GetValues(DataBar.DataValueEnum valueEnum)
 {
     return(GetValues(valueEnum, 0, int.MaxValue));
 }