/// <summary> /// Reinject all patterns /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Candles_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { if (e.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Add && Candles.Count() > 2) { // will be migrated to TA Node //var RawData = Candles.Select(y => y.Candle).ToList(); //var indexdcandles = new IndexedCandle(RawData, RawData.Count() - 1); //var LastBinanceCandle = (BinanceCandle)e.NewItems[0]; //LastBinanceCandle.Properties.Add("Bearish",indexdcandles.IsBearish()); //LastBinanceCandle.Properties.Add("IsBullish", indexdcandles.IsBullish()); //LastBinanceCandle.Properties.Add("IsAccumDistBearish", indexdcandles.IsAccumDistBearish()); //LastBinanceCandle.Properties.Add("IsAccumDistBullish", indexdcandles.IsAccumDistBullish()); //LastBinanceCandle.Properties.Add("ClosePricePercentageChange", indexdcandles.ClosePricePercentageChange()); //LastBinanceCandle.Properties.Add("ClosePriceChange", indexdcandles.ClosePriceChange()); //LastBinanceCandle.Properties.Add("IsBreakingHistoricalHighestClose", indexdcandles.IsBreakingHistoricalHighestClose()); //LastBinanceCandle.Properties.Add("IsBreakingHistoricalHighestHigh", indexdcandles.IsBreakingHistoricalHighestHigh()); //LastBinanceCandle.Properties.Add("IsBreakingHistoricalLowestLow", indexdcandles.IsBreakingHistoricalLowestLow()); //LastBinanceCandle.Properties.Add("IsObvBearish", indexdcandles.IsObvBearish()); //LastBinanceCandle.Properties.Add("IsObvBullish", indexdcandles.IsObvBullish()); } Task.Run(() => { System.Threading.Thread.Sleep(1000); Candles.Purge(); }); }