Example #1
0
        public void Save()
        {
            IBS.EndEdit();

            DB.TAMQA.UpdateAll(IdB);
            DB.TAM.UpdateAll(IdB);
        }
Example #2
0
        private void startButton_Click(object sender, EventArgs e)
        {
            startButton.Enabled = false;
            pauseResumeButton.Enabled = true;

            IBS solver = new IBS(periods, lcm, 10); //placeholder!
            //solver.run(); //put in backgroundWorker

            timer1.Start();
        }
        // Start Strategy 2
        async void Strategy2Start_Click(object sender, RoutedEventArgs e)
        {
            // Get data from textboxes / comboboxes
            GetStrategyData(out string strategyName, out MarketPeriod marketSeries, out CurrencyPair symbol, out double total, out bool?buy, out bool?sell, StrategyName2, MarketSeriesSelect2, Strategy2Symbol, Strategy2Buy, Strategy2Sell, Strategy2Total);

            // Save strategy settings to strategy class
            IBS ibs = new IBS(strategyName, marketSeries, symbol, buy, sell, total);

            // Create List
            // ObservableCollection<IBS> list = new ObservableCollection<IBS>();
            runningStrategyList.Add(ibs);
            this.RunningStrategies.ItemsSource = runningStrategyList;

            // Show saved settings in textblock - TEMP
            TestConsoleStrat2.Text = ibs.StrategyName + "\n" + ibs.Symbol + " | " + ibs.Total + " | " + ibs.Buy + " | " + ibs.Sell + " | " + ibs.MarketSeries;

            //Show dialogue box to show strategy is running
            await DialogBoxStrategy(StrategyName2.Content.ToString(), "Started");

            // Start Algo
            #pragma warning disable CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
            ibs.Start();
        }