示例#1
0
        public void ChangeCurrentBar(ITimeLineBar chart, int barPos)
        {
            this.BarPos = barPos;
            ReadOnlyList_TmpValue <double> timelist      = (ReadOnlyList_TmpValue <double>)Arr_Time;
            ReadOnlyList_TmpValue <float>  pricelist     = (ReadOnlyList_TmpValue <float>)Arr_Price;
            ReadOnlyList_TmpValue <int>    mountlist     = (ReadOnlyList_TmpValue <int>)Arr_Mount;
            ReadOnlyList_TmpValue <int>    holdlist      = (ReadOnlyList_TmpValue <int>)Arr_Hold;
            ReadOnlyList_TmpValue <float>  upPercentlist = (ReadOnlyList_TmpValue <float>)Arr_UpPercent;
            ReadOnlyList_TmpValue <float>  upRangelist   = (ReadOnlyList_TmpValue <float>)Arr_UpRange;

            if (chart == null)
            {
                timelist.ClearTmpValue();
                pricelist.ClearTmpValue();
                mountlist.ClearTmpValue();
                holdlist.ClearTmpValue();
                upPercentlist.ClearTmpValue();
                upRangelist.ClearTmpValue();
            }
            else
            {
                timelist.SetTmpValue(barPos, chart.Time);
                pricelist.SetTmpValue(barPos, chart.Price);
                mountlist.SetTmpValue(barPos, chart.Mount);
                holdlist.SetTmpValue(barPos, chart.Hold);
                upPercentlist.SetTmpValue(barPos, chart.UpPercent);
                upRangelist.SetTmpValue(barPos, chart.UpRange);
            }
        }
示例#2
0
 public TimeLineData_RealTime(ITimeLineData timeLineData)
 {
     this.timeLineData   = timeLineData;
     this.list_time      = new ReadOnlyList_TmpValue <double>(timeLineData.Arr_Time);
     this.list_price     = new ReadOnlyList_TmpValue <float>(timeLineData.Arr_Price);
     this.list_mount     = new ReadOnlyList_TmpValue <int>(timeLineData.Arr_Mount);
     this.list_hold      = new ReadOnlyList_TmpValue <int>(timeLineData.Arr_Hold);
     this.list_upPercent = new ReadOnlyList_TmpValue <float>(timeLineData.Arr_UpPercent);
     this.list_upRange   = new ReadOnlyList_TmpValue <float>(timeLineData.Arr_UpRange);
 }
示例#3
0
 public KLineData_RealTime(IKLineData klineData)
 {
     this.klineData               = klineData;
     this.BarPos                  = klineData.BarPos;
     this.Period                  = klineData.Period;
     this.list_Time               = new ReadOnlyList_TmpValue <double>(klineData.Arr_Time);
     this.list_Start              = new ReadOnlyList_TmpValue <float>(klineData.Arr_Start);
     this.list_High               = new ReadOnlyList_TmpValue <float>(klineData.Arr_High);
     this.list_Low                = new ReadOnlyList_TmpValue <float>(klineData.Arr_Low);
     this.list_End                = new ReadOnlyList_TmpValue <float>(klineData.Arr_End);
     this.list_Mount              = new ReadOnlyList_TmpValue <int>(klineData.Arr_Mount);
     this.list_Money              = new ReadOnlyList_TmpValue <float>(klineData.Arr_Money);
     this.list_Hold               = new ReadOnlyList_TmpValue <int>(klineData.Arr_Hold);
     this.list_Height             = new ReadOnlyList_TmpValue <float>(klineData.Arr_Height);
     this.list_HeightPercent      = new ReadOnlyList_TmpValue <float>(klineData.Arr_HeightPercent);
     this.list_BlockHigh          = new ReadOnlyList_TmpValue <float>(klineData.Arr_BlockHigh);
     this.list_BlockLow           = new ReadOnlyList_TmpValue <float>(klineData.Arr_BlockLow);
     this.list_BlockHeight        = new ReadOnlyList_TmpValue <float>(klineData.Arr_BlockHeight);
     this.list_BlockHeightPercent = new ReadOnlyList_TmpValue <float>(klineData.Arr_BlockHeightPercent);
     this.list_UpPercent          = new ReadOnlyList_TmpValue <float>(klineData.Arr_UpPercent);
 }