Example #1
0
 public void AddPrintToBar(double price, int volume, PrintType typeOfPrint)
 {
     if (currentBar.ListOfCurrentBar.ContainsKey(price))
     {
         currentBar.ListOfCurrentBar[price].AddPrintOnClaster(volume, typeOfPrint);
     }
     else
     {
         CurrentClaster claster = new CurrentClaster();
         currentBar.ListOfCurrentBar.Add(price, claster);
         currentBar.ListOfCurrentBar[price].AddPrintOnClaster(volume, typeOfPrint);
     }
     if (currentBar.pocPrice == 0)
     {
         currentBar.pocPrice = price;
     }
     else
     {
         if (currentBar.pocPrice != price && currentBar.ListOfCurrentBar[price].Volume_sum >= currentBar.ListOfCurrentBar[currentBar.pocPrice].Volume_sum)
         {
             currentBar.pocPrice = price;
         }
     }
     currentBar.dayPocPrice = DayProfile.pocPrice;
 }
Example #2
0
 public void AddPrintToHistogramm(double price, int volume, PrintType typeOfPrint)
 {
     if (this.ListOfCurrentBar.ContainsKey(price))
     {
         this.ListOfCurrentBar[price].AddPrintOnClaster(volume, typeOfPrint);
     }
     else
     {
         CurrentClaster claster = new CurrentClaster();
         this.ListOfCurrentBar.Add(price, claster);
         this.ListOfCurrentBar[price].AddPrintOnClaster(volume, typeOfPrint);
     }
     if (this.pocPrice == 0)
     {
         this.pocPrice = price;
     }
     else
     {
         if (this.pocPrice != price && this.ListOfCurrentBar[price].Volume_sum >= this.ListOfCurrentBar[this.pocPrice].Volume_sum)
         {
             this.pocPrice = price;
         }
     }
 }