The candle stick chart from FusionCharts v3 PowerCharts suite offers your a powerful and interactive interface to plot your stock data. It offers the following features: Features: Integrated price and volume plot. Volume plot can be turned on or off. Multiple options for price plotting - Candle stick / bar / line Interactive tool tip and customizable hover bar Allows you to plot trend lines and zones on the chart Apart from trend lines and zones, you can plot any number of custom trend sets on the chart. These trend sets can be customized to show any technical indicators. You can easily provide missing data using this chart. Any particular candle can be highlighted using color combination. Vertical indicator lines can be drawn at any point on x-axis.
Наследование: NSoft.NFramework.FusionCharts.Charts.FusionChartBase
Пример #1
0
 private static void FillTrendset(CandleStick candle, string name, double minX, double maxX) {
     candle.Trendset.Name = name;
     for(var x = (int)minX; x < (int)maxX; x++) {
         var data = candle.Dataset.ElementAtOrDefault(x);
         if(data != null && data.High.HasValue && data.Low.HasValue)
             candle.Trendset.AddSet(x, (data.High.Value + data.Low.Value) / 2.0);
     }
 }
Пример #2
0
 private static void FillTrendset(CandleStick candle, string name, double minX, double maxX)
 {
     candle.Trendset.Name = name;
     for (var x = (int)minX; x < (int)maxX; x++)
     {
         var data = candle.Dataset.ElementAtOrDefault(x);
         if (data != null && data.High.HasValue && data.Low.HasValue)
         {
             candle.Trendset.AddSet(x, (data.High.Value + data.Low.Value) / 2.0);
         }
     }
 }
Пример #3
0
 private static void FillVTrendLines(CandleStick candle)
 {
     candle.VTrendLines.Add(new DoubleLineElement
     {
         StartValue   = 10,
         EndValue     = 13,
         Color        = "#FF5904".FromHtml(),
         DisplayValue = "Result Impact",
         IsTrendZone  = true,
         Alpha        = 10
     });
 }
Пример #4
0
        private static void FillData(CandleStick candle, double minX, double maxX) {
            for(double x = minX; x < maxX; x += 1) {
                var open = rnd.Next(30, 60) * rnd.Next(90, 111) * (x / 10.0) / 2000.0;
                // var high = rnd.Next(22, 28) * rnd.Next(90, 110) * 1.1 * x / 50.0;
                var high = open + rnd.Next(-120, 120) * 0.01;
                var volume = rnd.Next(20, 100) * 1000000.0;

                candle.AddSet(x,
                              open,
                              open - rnd.Next(-50, 100) * 0.01,
                              high,
                              high - rnd.Next(-50, 100) * 0.01,
                              volume);
            }
        }
Пример #5
0
 private static CandleStick CreateSimpleCandleStick(string caption) {
     var chart = new CandleStick
                 {
                     Caption = caption,
                     Palette = rnd.Next(1, 6),
                     BearBorderColor = "#E33C3C".FromHtml(),
                     BearFillColor = "#E33C3C".FromHtml(),
                     BullBorderColor = "#1F3165".FromHtml(),
                     PYAxisName = "Price",
                     VYAxisName = "Volume (In Millions)",
                     NumPDivLines = 5
                 };
     chart.NumberAttr.NumberPrefix = "$";
     return chart;
 }
Пример #6
0
        private static void FillData(CandleStick candle, double minX, double maxX)
        {
            for (double x = minX; x < maxX; x += 1)
            {
                var open = rnd.Next(30, 60) * rnd.Next(90, 111) * (x / 10.0) / 2000.0;
                // var high = rnd.Next(22, 28) * rnd.Next(90, 110) * 1.1 * x / 50.0;
                var high   = open + rnd.Next(-120, 120) * 0.01;
                var volume = rnd.Next(20, 100) * 1000000.0;

                candle.AddSet(x,
                              open,
                              open - rnd.Next(-50, 100) * 0.01,
                              high,
                              high - rnd.Next(-50, 100) * 0.01,
                              volume);
            }
        }
Пример #7
0
        private static CandleStick CreateSimpleCandleStick(string caption)
        {
            var chart = new CandleStick
            {
                Caption         = caption,
                Palette         = rnd.Next(1, 6),
                BearBorderColor = "#E33C3C".FromHtml(),
                BearFillColor   = "#E33C3C".FromHtml(),
                BullBorderColor = "#1F3165".FromHtml(),
                PYAxisName      = "Price",
                VYAxisName      = "Volume (In Millions)",
                NumPDivLines    = 5
            };

            chart.NumberAttr.NumberPrefix = "$";
            return(chart);
        }
Пример #8
0
 private static void FillTrendLines(CandleStick candle)
 {
     // displayvalue='S1' thickness='0' dashed='1' dashLen='2' dashGap='2'
     candle.TrendLines.Add(new DoubleLineElement
     {
         StartValue   = 4.2,
         Color        = "#0382AB".FromHtml(),
         DisplayValue = "S1",
         Thickness    = 0,
         IsDashed     = true,
         DashLen      = 2,
         DashGap      = 2
     });
     candle.TrendLines.Add(new DoubleLineElement
     {
         StartValue   = 4.8,
         Color        = "#0382AB".FromHtml(),
         DisplayValue = "S2",
         Thickness    = 0,
         IsDashed     = true,
         DashLen      = 2,
         DashGap      = 2
     });
     candle.TrendLines.Add(new DoubleLineElement
     {
         StartValue   = 15.5,
         Color        = "#0382AB".FromHtml(),
         DisplayValue = "R1",
         Thickness    = 0,
         IsDashed     = true,
         DashLen      = 2,
         DashGap      = 2
     });
     candle.TrendLines.Add(new DoubleLineElement
     {
         StartValue   = 15.2,
         Color        = "#0382AB".FromHtml(),
         DisplayValue = "R2",
         Thickness    = 0,
         IsDashed     = true,
         DashLen      = 2,
         DashGap      = 2
     });
 }
Пример #9
0
 private static void FillTrendLines(CandleStick candle) {
     // displayvalue='S1' thickness='0' dashed='1' dashLen='2' dashGap='2'
     candle.TrendLines.Add(new DoubleLineElement
                           {
                               StartValue = 4.2,
                               Color = "#0382AB".FromHtml(),
                               DisplayValue = "S1",
                               Thickness = 0,
                               IsDashed = true,
                               DashLen = 2,
                               DashGap = 2
                           });
     candle.TrendLines.Add(new DoubleLineElement
                           {
                               StartValue = 4.8,
                               Color = "#0382AB".FromHtml(),
                               DisplayValue = "S2",
                               Thickness = 0,
                               IsDashed = true,
                               DashLen = 2,
                               DashGap = 2
                           });
     candle.TrendLines.Add(new DoubleLineElement
                           {
                               StartValue = 15.5,
                               Color = "#0382AB".FromHtml(),
                               DisplayValue = "R1",
                               Thickness = 0,
                               IsDashed = true,
                               DashLen = 2,
                               DashGap = 2
                           });
     candle.TrendLines.Add(new DoubleLineElement
                           {
                               StartValue = 15.2,
                               Color = "#0382AB".FromHtml(),
                               DisplayValue = "R2",
                               Thickness = 0,
                               IsDashed = true,
                               DashLen = 2,
                               DashGap = 2
                           });
 }
Пример #10
0
 private static void FillVTrendLines(CandleStick candle) {
     candle.VTrendLines.Add(new DoubleLineElement
                            {
                                StartValue = 10,
                                EndValue = 13,
                                Color = "#FF5904".FromHtml(),
                                DisplayValue = "Result Impact",
                                IsTrendZone = true,
                                Alpha = 10
                            });
 }
 private static CandleStick CreateSimpleCandleStick(string caption) {
     var candle = new CandleStick
                  {
                      Caption = caption,
                      Palette = rnd.Next(1, 6),
                      BearBorderColor = "#E33C3C".FromHtml(),
                      BearFillColor = "#E33C3C".FromHtml(),
                      BullBorderColor = "#1F3165".FromHtml(),
                      PYAxisName = "Price",
                      VYAxisName = "Volume (In Millions)",
                      NumPDivLines = 5,
                      ShowVolumeChart = true,
                      VolumeHeightPercent = 30,
                      NumberAttr = { NumberPrefix = "$" }
                  };
     return candle;
 }