Esempio n. 1
0
        public RsiPaneViewModel(CreateMultiPaneStockChartsViewModel parentViewModel, PriceSeries prices)
            : base(parentViewModel)
        {
            var rsiSeries = new XyDataSeries <DateTime, double>()
            {
                SeriesName = "RSI"
            };

            rsiSeries.Append(prices.TimeData, prices.Rsi(14));
            ChartSeriesViewModels.Add(new LineRenderableSeriesViewModel {
                DataSeries = rsiSeries
            });

            YAxisTextFormatting = "0.0";

            Height = 100;
        }
Esempio n. 2
0
            public RsiPaneModel(Context context, PriceSeries prices) : base(context, RSI, "0.0", false)
            {
                var rsiSeries = new XyDataSeries <DateTime, double> {
                    SeriesName = "RSI"
                };
                var xData = prices.TimeData;
                var yData = prices.Rsi(14);

                rsiSeries.Append(xData, yData);
                AddRenderableSeries(new FastLineRenderableSeries  {
                    DataSeries = rsiSeries, YAxisId = RSI
                });

                Annotations.Add(new AxisMarkerAnnotation(context)
                {
                    Y1 = (Java.Lang.IComparable)rsiSeries.YValues.Get(rsiSeries.Count - 1), YAxisId = RSI
                });
            }
Esempio n. 3
0
            public RsiPaneModel(PriceSeries prices) : base(RSI, "%.1f", false)
            {
                var rsiSeries = new XyDataSeries <DateTime, double> {
                    SeriesName = "RSI"
                };
                var xData = prices.TimeData;
                var yData = prices.Rsi(14);

                rsiSeries.Append(xData, yData);
                AddRenderableSeries(new SCIFastLineRenderableSeries {
                    DataSeries = rsiSeries, YAxisId = RSI, StrokeStyle = new SCISolidPenStyle(0xFFC6E6FF, 1f)
                });

                Annotations.Add(new SCIAxisMarkerAnnotation
                {
                    Position = rsiSeries.YValues.ValueAt(rsiSeries.Count - 1).ToComparable(),
                    YAxisId  = RSI
                });
            }