示例#1
0
 public bool UpdateTicker()
 {
     if (IsUpdatingTicker)
     {
         return(true);
     }
     IsUpdatingTicker = true;
     try {
         bool res = Exchange.UpdateTicker(this);
         if (res)
         {
             Time = DateTime.UtcNow;
             UpdateHistoryItem();
         }
         return(res);
     }
     finally {
         IsUpdatingTicker = false;
     }
 }
 public bool UpdateTicker()
 {
     if (IsUpdatingTicker)
     {
         return(true);
     }
     IsUpdatingTicker = true;
     try {
         bool res = Exchange.UpdateTicker(this);
         if (res)
         {
             Time = DateTime.UtcNow;
             UpdateHistoryItem();
             CandleStickChartHelper.AddCandleStickData(CandleStickData, History.Last(), CandleStickPeriodMin * 60);
         }
         return(res);
     }
     finally {
         IsUpdatingTicker = false;
     }
 }