Exemple #1
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            CGRect exampleBounds         = this.ExampleBounds;
            CGRect overlayChartBounds    = new CGRect(exampleBounds.X, exampleBounds.Y, exampleBounds.Width, exampleBounds.Height / 1.5f);
            CGRect indicatorsChartBounds = new CGRect(exampleBounds.X, overlayChartBounds.Height + 15, exampleBounds.Width, exampleBounds.Height / 3.0f);

            overlayChart = new TKChart(overlayChartBounds);
            overlayChart.GridStyle.VerticalLinesHidden = false;
            overlayChart.AutoresizingMask = ~UIViewAutoresizing.None;
            this.View.AddSubview(overlayChart);

            indicatorsChart = new TKChart(indicatorsChartBounds);
            indicatorsChart.AutoresizingMask = ~UIViewAutoresizing.None;
            this.View.AddSubview(indicatorsChart);

            data     = StockDataPoint.LoadStockPoints(-1);
            settings = new IndicatorsTableView(this);

            SelectedIndicator = 0;
            SelectedTrendLine = 0;

            series = new TKChartCandlestickSeries(data.ToArray());

            overlayChart.Delegate = new ChartDelegate(indicatorsChart);

            this.loadCharts();
        }
Exemple #2
0
        public override void ViewDidLoad()
        {
            Trendlines = new List <OptionInfo> ();
            Indicators = new List <OptionInfo> ();

            this.addTrendlineOption("Simple moving average", (object o, EventArgs e) => { addOverlayToChart(new TKChartSimpleMovingAverageIndicator(series)); });
            this.addTrendlineOption("Exponential moving average", (object o, EventArgs e) => { addOverlayToChart(new TKChartExponentialMovingAverageIndicator(series)); });
            this.addTrendlineOption("Weighted moving average", (object o, EventArgs e) => { addOverlayToChart(new TKChartWeightedMovingAverageIndicator(series)); });
            this.addTrendlineOption("Triangular moving average", (object o, EventArgs e) => { addOverlayToChart(new TKChartTriangularMovingAverageIndicator(series)); });
            this.addTrendlineOption("Bollinger bands indicator", (object o, EventArgs e) => { addOverlayToChart(new TKChartBollingerBandIndicator(series)); });
            this.addTrendlineOption("Moving average envelopes", (object o, EventArgs e) => { addOverlayToChart(new TKChartMovingAverageEnvelopesIndicator(series)); });
            this.addIndicatorOption("Percentage volume oscillator", (object o, EventArgs e) => { addIndicatorToChart(new TKChartPercentageVolumeOscillator(series)); });
            this.addIndicatorOption("Percentage price oscillator", (object o, EventArgs e) => { addIndicatorToChart(new TKChartPercentagePriceOscillator(series)); });
            this.addIndicatorOption("Absolute volume oscillator", (object o, EventArgs e) => { addIndicatorToChart(new TKChartAbsoluteVolumeOscillator(series)); });
            this.addIndicatorOption("MACD indicator", (object o, EventArgs e) => { addIndicatorToChart(new TKChartMACDIndicator(series)); });
            this.addIndicatorOption("RSI", (object o, EventArgs e) => { addIndicatorToChart(new TKChartRelativeStrengthIndex(series)); });
            this.addIndicatorOption("Accumulation distribution line", (object o, EventArgs e) => { addIndicatorToChart(new TKChartAccumulationDistributionLine(series)); });
            this.addIndicatorOption("True range", (object o, EventArgs e) => { addIndicatorToChart(new TKChartTrueRangeIndicator(series)); });
            this.addIndicatorOption("Average true range", (object o, EventArgs e) => { addIndicatorToChart(new TKChartAverageTrueRangeIndicator(series)); });
            this.addIndicatorOption("Commodity channel index", (object o, EventArgs e) => { addIndicatorToChart(new TKChartCommodityChannelIndex(series)); });
            this.addIndicatorOption("Fast stochastic indicator", (object o, EventArgs e) => { addIndicatorToChart(new TKChartFastStochasticIndicator(series)); });
            this.addIndicatorOption("Slow stochastic indicator", (object o, EventArgs e) => { addIndicatorToChart(new TKChartSlowStochasticIndicator(series)); });
            this.addIndicatorOption("Rate of change", (object o, EventArgs e) => { addIndicatorToChart(new TKChartRateOfChangeIndicator(series)); });
            this.addIndicatorOption("TRIX", (object o, EventArgs e) => { addIndicatorToChart(new TKChartTRIXIndicator(series)); });
            this.addIndicatorOption("Williams percent", (object o, EventArgs e) => { addIndicatorToChart(new TKChartWilliamsPercentIndicator(series)); });
            this.addTrendlineOption("Typical price", (object o, EventArgs e) => { addOverlayToChart(new TKChartTypicalPriceIndicator(series)); });
            this.addTrendlineOption("Weighted close", (object o, EventArgs e) => { addOverlayToChart(new TKChartWeightedCloseIndicator(series)); });
            this.addIndicatorOption("Ease of movement", (object o, EventArgs e) => { addIndicatorToChart(new TKChartEaseOfMovementIndicator(series)); });
            this.addTrendlineOption("Median price", (object o, EventArgs e) => { addIndicatorToChart(new TKChartMedianPriceIndicator(series)); });
            this.addIndicatorOption("Detrended price oscillator", (object o, EventArgs e) => { addIndicatorToChart(new TKChartDetrendedPriceOscillator(series)); });
            this.addIndicatorOption("Force index", (object o, EventArgs e) => { addIndicatorToChart(new TKChartForceIndexIndicator(series)); });
            this.addIndicatorOption("Rapid adaptive variance", (object o, EventArgs e) => { addIndicatorToChart(new TKChartRapidAdaptiveVarianceIndicator(series)); });
            this.addTrendlineOption("Modified moving average", (object o, EventArgs e) => { addOverlayToChart(new TKChartModifiedMovingAverageIndicator(series)); });
            this.addTrendlineOption("Adaptive moving average", (object o, EventArgs e) => { addOverlayToChart(new TKChartAdaptiveMovingAverageIndicator(series)); });
            this.addIndicatorOption("Standard deviation", (object o, EventArgs e) => { addIndicatorToChart(new TKChartStandardDeviationIndicator(series)); });
            this.addIndicatorOption("Relative momentum index", (object o, EventArgs e) => { addIndicatorToChart(new TKChartRelativeMomentumIndex(series)); });
            this.addIndicatorOption("On balance volume", (object o, EventArgs e) => { addIndicatorToChart(new TKChartOnBalanceVolumeIndicator(series)); });
            this.addIndicatorOption("Price volume trend", (object o, EventArgs e) => { addIndicatorToChart(new TKChartPriceVolumeTrendIndicator(series)); });
            this.addIndicatorOption("Positive volume index", (object o, EventArgs e) => { addIndicatorToChart(new TKChartPositiveVolumeIndexIndicator(series)); });
            this.addIndicatorOption("Negative volume index", (object o, EventArgs e) => { addIndicatorToChart(new TKChartNegativeVolumeIndexIndicator(series)); });
            this.addIndicatorOption("Money flow index", (object o, EventArgs e) => { addIndicatorToChart(new TKChartMoneyFlowIndexIndicator(series)); });
            this.addIndicatorOption("Ultimate oscillator", (object o, EventArgs e) => { addIndicatorToChart(new TKChartUltimateOscillator(series)); });
            this.addIndicatorOption("Full stochastic indicator", (object o, EventArgs e) => { addIndicatorToChart(new TKChartFullStochasticIndicator(series)); });
            this.addIndicatorOption("Market facilitation index", (object o, EventArgs e) => { addIndicatorToChart(new TKChartMarketFacilitationIndex(series)); });
            this.addIndicatorOption("Chaikin oscillator", (object o, EventArgs e) => { addIndicatorToChart(new TKChartChaikinOscillator(series)); });

            base.ViewDidLoad();

            CGRect exampleBounds         = this.ExampleBounds;
            CGRect overlayChartBounds    = new CGRect(exampleBounds.X, exampleBounds.Y, exampleBounds.Width, exampleBounds.Height / 1.5f);
            CGRect indicatorsChartBounds = new CGRect(exampleBounds.X, overlayChartBounds.Height + 15, exampleBounds.Width, exampleBounds.Height / 3.0f);

            overlayChart = new TKChart(overlayChartBounds);
            overlayChart.GridStyle.VerticalLinesHidden = false;
            overlayChart.AutoresizingMask = ~UIViewAutoresizing.None;
            this.View.AddSubview(overlayChart);

            indicatorsChart = new TKChart(indicatorsChartBounds);
            indicatorsChart.AutoresizingMask = ~UIViewAutoresizing.None;
            this.View.AddSubview(indicatorsChart);

            data     = StockDataPoint.LoadStockPoints(-1);
            settings = new IndicatorsTableView(this);

            SelectedIndicator = 0;
            SelectedTrendLine = 0;

            series = new TKChartCandlestickSeries(data.ToArray());

            overlayChart.Delegate = chartDelegate;

            this.loadCharts();
        }
        public override void ViewDidLoad()
        {
            Trendlines = new List<OptionInfo> ();
            Indicators = new List<OptionInfo> ();

            this.addTrendlineOption("Simple moving average", (object o, EventArgs e) => { addOverlayToChart(new TKChartSimpleMovingAverageIndicator(series)); });
            this.addTrendlineOption("Exponential moving average", (object o, EventArgs e) => { addOverlayToChart(new TKChartExponentialMovingAverageIndicator(series)); });
            this.addTrendlineOption("Weighted moving average", (object o, EventArgs e) => { addOverlayToChart(new TKChartWeightedMovingAverageIndicator(series)); });
            this.addTrendlineOption("Triangular moving average", (object o, EventArgs e) => { addOverlayToChart(new TKChartTriangularMovingAverageIndicator(series)); });
            this.addTrendlineOption("Bollinger bands indicator", (object o, EventArgs e) => { addOverlayToChart(new TKChartBollingerBandIndicator(series)); });
            this.addTrendlineOption("Moving average envelopes", (object o, EventArgs e) => { addOverlayToChart(new TKChartMovingAverageEnvelopesIndicator(series)); });
            this.addIndicatorOption("Percentage volume oscillator", (object o, EventArgs e) => { addIndicatorToChart(new TKChartPercentageVolumeOscillator(series)); });
            this.addIndicatorOption("Percentage price oscillator", (object o, EventArgs e) => { addIndicatorToChart(new TKChartPercentagePriceOscillator(series)); });
            this.addIndicatorOption("Absolute volume oscillator", (object o, EventArgs e) => { addIndicatorToChart(new TKChartAbsoluteVolumeOscillator(series)); });
            this.addIndicatorOption("MACD indicator", (object o, EventArgs e) => { addIndicatorToChart(new TKChartMACDIndicator(series)); });
            this.addIndicatorOption("RSI", (object o, EventArgs e) => { addIndicatorToChart(new TKChartRelativeStrengthIndex(series)); });
            this.addIndicatorOption("Accumulation distribution line", (object o, EventArgs e) => { addIndicatorToChart(new TKChartAccumulationDistributionLine(series)); });
            this.addIndicatorOption("True range", (object o, EventArgs e) => { addIndicatorToChart(new TKChartTrueRangeIndicator(series)); });
            this.addIndicatorOption("Average true range", (object o, EventArgs e) => { addIndicatorToChart(new TKChartAverageTrueRangeIndicator(series)); });
            this.addIndicatorOption("Commodity channel index", (object o, EventArgs e) => { addIndicatorToChart(new TKChartCommodityChannelIndex(series)); });
            this.addIndicatorOption("Fast stochastic indicator", (object o, EventArgs e) => { addIndicatorToChart(new TKChartFastStochasticIndicator(series)); });
            this.addIndicatorOption("Slow stochastic indicator", (object o, EventArgs e) => { addIndicatorToChart(new TKChartSlowStochasticIndicator(series)); });
            this.addIndicatorOption("Rate of change", (object o, EventArgs e) => { addIndicatorToChart(new TKChartRateOfChangeIndicator(series)); });
            this.addIndicatorOption("TRIX", (object o, EventArgs e) => { addIndicatorToChart(new TKChartTRIXIndicator(series)); });
            this.addIndicatorOption("Williams percent", (object o, EventArgs e) => { addIndicatorToChart(new TKChartWilliamsPercentIndicator(series)); });
            this.addTrendlineOption("Typical price", (object o, EventArgs e) => { addOverlayToChart(new TKChartTypicalPriceIndicator(series)); });
            this.addTrendlineOption("Weighted close", (object o, EventArgs e) => { addOverlayToChart(new TKChartWeightedCloseIndicator(series)); });
            this.addIndicatorOption("Ease of movement", (object o, EventArgs e) => { addIndicatorToChart(new TKChartEaseOfMovementIndicator(series)); });
            this.addTrendlineOption("Median price", (object o, EventArgs e) => { addIndicatorToChart(new TKChartMedianPriceIndicator(series)); });
            this.addIndicatorOption("Detrended price oscillator", (object o, EventArgs e) => { addIndicatorToChart(new TKChartDetrendedPriceOscillator(series)); });
            this.addIndicatorOption("Force index", (object o, EventArgs e) => { addIndicatorToChart(new TKChartForceIndexIndicator(series)); });
            this.addIndicatorOption("Rapid adaptive variance", (object o, EventArgs e) => { addIndicatorToChart(new TKChartRapidAdaptiveVarianceIndicator(series)); });
            this.addTrendlineOption("Modified moving average", (object o, EventArgs e) => { addOverlayToChart(new TKChartModifiedMovingAverageIndicator(series)); });
            this.addTrendlineOption("Adaptive moving average", (object o, EventArgs e) => { addOverlayToChart(new TKChartAdaptiveMovingAverageIndicator(series)); });
            this.addIndicatorOption("Standard deviation", (object o, EventArgs e) => { addIndicatorToChart(new TKChartStandardDeviationIndicator(series)); });
            this.addIndicatorOption("Relative momentum index", (object o, EventArgs e) => { addIndicatorToChart(new TKChartRelativeMomentumIndex(series)); });
            this.addIndicatorOption("On balance volume", (object o, EventArgs e) => { addIndicatorToChart(new TKChartOnBalanceVolumeIndicator(series)); });
            this.addIndicatorOption("Price volume trend", (object o, EventArgs e) => { addIndicatorToChart(new TKChartPriceVolumeTrendIndicator(series)); });
            this.addIndicatorOption("Positive volume index", (object o, EventArgs e) => { addIndicatorToChart(new TKChartPositiveVolumeIndexIndicator(series)); });
            this.addIndicatorOption("Negative volume index", (object o, EventArgs e) => { addIndicatorToChart(new TKChartNegativeVolumeIndexIndicator(series)); });
            this.addIndicatorOption("Money flow index", (object o, EventArgs e) => { addIndicatorToChart(new TKChartMoneyFlowIndexIndicator(series)); });
            this.addIndicatorOption("Ultimate oscillator", (object o, EventArgs e) => { addIndicatorToChart(new TKChartUltimateOscillator(series)); });
            this.addIndicatorOption("Full stochastic indicator", (object o, EventArgs e) => { addIndicatorToChart(new TKChartFullStochasticIndicator(series)); });
            this.addIndicatorOption("Market facilitation index", (object o, EventArgs e) => { addIndicatorToChart(new TKChartMarketFacilitationIndex(series)); });
            this.addIndicatorOption("Chaikin oscillator", (object o, EventArgs e) => { addIndicatorToChart(new TKChartChaikinOscillator(series)); });

            base.ViewDidLoad ();

            CGRect exampleBounds = this.ExampleBounds;
            CGRect overlayChartBounds = new CGRect (exampleBounds.X, exampleBounds.Y, exampleBounds.Width, exampleBounds.Height/1.5f);
            CGRect indicatorsChartBounds = new CGRect (exampleBounds.X, overlayChartBounds.Height + 15, exampleBounds.Width, exampleBounds.Height / 3.0f);

            overlayChart = new TKChart (overlayChartBounds);
            overlayChart.GridStyle.VerticalLinesHidden = false;
            overlayChart.AutoresizingMask = ~UIViewAutoresizing.None;
            this.View.AddSubview (overlayChart);

            indicatorsChart = new TKChart (indicatorsChartBounds);
            indicatorsChart.AutoresizingMask = ~UIViewAutoresizing.None;
            this.View.AddSubview (indicatorsChart);

            data = StockDataPoint.LoadStockPoints(-1);
            settings = new IndicatorsTableView (this);

            SelectedIndicator = 0;
            SelectedTrendLine = 0;

            series = new TKChartCandlestickSeries (data.ToArray ());

            overlayChart.Delegate = chartDelegate;

            this.loadCharts ();
        }
Exemple #4
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad ();

            CGRect exampleBounds = this.ExampleBounds;
            CGRect overlayChartBounds = new CGRect (exampleBounds.X, exampleBounds.Y, exampleBounds.Width, exampleBounds.Height/1.5f);
            CGRect indicatorsChartBounds = new CGRect (exampleBounds.X, overlayChartBounds.Height + 15, exampleBounds.Width, exampleBounds.Height / 3.0f);

            overlayChart = new TKChart (overlayChartBounds);
            overlayChart.GridStyle.VerticalLinesHidden = false;
            overlayChart.AutoresizingMask = ~UIViewAutoresizing.None;
            this.View.AddSubview (overlayChart);

            indicatorsChart = new TKChart (indicatorsChartBounds);
            indicatorsChart.AutoresizingMask = ~UIViewAutoresizing.None;
            this.View.AddSubview (indicatorsChart);

            data = StockDataPoint.LoadStockPoints(-1);
            settings = new IndicatorsTableView (this);

            SelectedIndicator = 0;
            SelectedTrendLine = 0;

            series = new TKChartCandlestickSeries (data.ToArray ());

            overlayChart.Delegate = new ChartDelegate (indicatorsChart);

            this.loadCharts ();
        }