Ejemplo n.º 1
0
 private void biAnalyseTradeHistory_ItemClick(object sender, ItemClickEventArgs e)
 {
     this.dpLog.Visibility = DockVisibility.Visible;
     Application.DoEvents();
     if (TradeHistoryCalculationThread != null)
     {
         return;
     }
     DownloadCanceled = false;
     TradeHistoryCalculationThread = new Thread(() => {
         TradeHistoryIntensityInfo info = new TradeHistoryIntensityInfo()
         {
             Exchange       = PoloniexExchange.Default,
             BaseCurrencies = new string[] { "USDT" }
         };
         info.TickerAdded += (d, ee) => {
             Application.DoEvents();
         };
         if (!info.Calculate())
         {
             BeginInvoke(new Action <string>(OnError), new object[] { "Error calculating volatility" });
             return;
         }
         BeginInvoke(new Action <TradeHistoryIntensityInfo>(OnTradeHistoryInfoCalculated), new object[] { info });
     });
     TradeHistoryCalculationThread.Start();
 }