Example #1
0
        public Strategy(IStrategy st)
        {
            ema       = new EMA();
            shortEMA  = new List <double>(32768);
            longEMA   = new List <double>(32768);
            shortDay  = new List <double>(512);
            longDay   = new List <double>(512);
            shortTick = new List <double>(2097152);
            longTick  = new List <double>(2097152);
            Send     += Analysis;
            SendTick += new StatisticalAnalysisOnWidth().Analysis;
            this.st   = st;

            if (st.Division)
            {
                info = new Information(st);
            }

            GetChart();

            if (st.Division)
            {
                info.Log();

                return;
            }
            Send         -= Analysis;
            api           = PublicFutures.Get();
            api.Retention = Retention;
            result        = Choose.Show("Decide How to Order. . .", "Notice", "MarketPrice", "SpecifyPrice", "DotHighPrice");
            om            = order[result];
            api.Send     += Analysis;
        }
Example #2
0
        public Korea(int type)
        {
            InitializeComponent();
            dr = Choose.Show("Please Select the Button You Want to Proceed. . .", "Choose", "Trading", "BackTest", "Exit");

            if (dr == DialogResult.Yes)
            {
                Confirm.Get().Show();
                api = Futures.Get();
                new Statistics(type);
                new Temporary(type);
                api.SetAPI(axAPI);
                api.StartProgress(type);
                api.SendExit += OnReceiveExit;
            }
            else if (dr == DialogResult.No)
            {
                axAPI.Dispose();
                int i, l = type > 0 ? 50 : 100;

                for (i = type > 0 ? 1 : 10; i < l; i++)
                {
                    new Statistics(i, type);
                }

                new Storage(type);
                Box.Show("Complete. . .♬", "Notice", 3750);
                OnReceiveExit();
            }
            else
            {
                OnReceiveExit();
            }
        }
        private async void Register_Clicked(object sender, RoutedEventArgs e)
        {
            if (count++ < 3)
            {
                var values = new Dictionary <string, string> {
                    { "Action", "Registration" },
                    { "Login", Login1.Text },
                    { "Password", Password1.Text },
                    { "Email", Email.Text }
                };


                var responseMessage = await Sender.Sender.Send(values);

                if (responseMessage.StatusCode == System.Net.HttpStatusCode.OK)
                {
                    RegError.Visibility = Visibility.Hidden;
                    count = 0;
                    Choose choose = new Choose();
                    this.Hide();
                    choose.Show();
                }
                else
                {
                    switch ((int)responseMessage.StatusCode)
                    {
                    case 401:
                    {
                        RegError.Content = "Данный пользователь уже зарегистрирован";
                        break;
                    }

                    case 402:
                    {
                        RegError.Content = "Неверный логин или пароль";
                        break;
                    }

                    default:
                        break;
                    }
                    RegError.Visibility = Visibility.Visible;
                }
            }
            else
            {
                MessageBox.Show("Количество попыток израсходавано, попробуйте позже");
                this.Close();
            }
        }
Example #4
0
 private void Form1_Load(object sender, EventArgs e)
 {
     lblWelcome.Show();
     lblOption.Hide();
     Residential.Hide();
     Commercial.Hide();
     Industrial.Hide();
     PeakHours.Hide();
     OffPeak.Hide();
     lblEnter.Hide();
     txtInput.Hide();
     btnCalculate.Hide();
     btnClear.Hide();
     Output.Hide();
     Choose.Show();
     btnExit.Hide();
 }
        private async void Login_Clicked(object sender, RoutedEventArgs e)
        {
            if (count++ < 3)
            {
                var values = new Dictionary <string, string> {
                    { "Action", "Authentication" },
                    { "Login", Login.Text },
                    { "Password", Password.Text }
                };


                var responseMessage = await Sender.Sender.Send(values);

                if (responseMessage.StatusCode == System.Net.HttpStatusCode.NotFound)
                {
                    ErrorLabel.Visibility = Visibility.Hidden;
                    count       = 0;
                    isConnected = false;
                    Choose choose = new Choose();
                    choose.B1.IsEnabled = false;
                    choose.Title        = "Подключение не было установлено";
                    this.Hide();
                    choose.Show();
                }
                else
                if (responseMessage.StatusCode == System.Net.HttpStatusCode.OK)
                {
                    ErrorLabel.Visibility = Visibility.Hidden;
                    count       = 0;
                    isConnected = true;
                    Choose choose = new Choose();
                    this.Hide();
                    choose.Show();
                }
                else
                {
                    ErrorLabel.Visibility = Visibility.Visible;
                }
            }
            else
            {
                MessageBox.Show("Количество попыток израсходавано, попробуйте позже");
                this.Close();
            }
        }
Example #6
0
        public GoblinBat()
        {
            InitializeComponent();

            dr = Choose.Show("Please Select the Button You Want to Proceed.", "Choose", "Invest", "BackTest", "Exit");

            if (dr == DialogResult.Yes)
            {
                api = Futures.Get();

                new Statistics();
                new Temporary();

                timer.Start();
                api.SetAPI(axAPI);
                api.StartProgress();
                api.SendExit += OnReceiveExit;
            }
            else if (dr == DialogResult.No)
            {
                axAPI.Dispose();
                timer.Dispose();

                int i, l = 100;

                for (i = 11; i < l; i++)
                {
                    new Statistics(i);
                }

                new Storage();

                Box.Show("Complete...!!", "Notice", 3750);

                Dispose();

                Environment.Exit(0);
            }
            else
            {
                Dispose();

                Environment.Exit(0);
            }
        }
Example #7
0
        //
        // Korisnik je izabrao jedan od ponudjenih naloga
        //
        private void LinkedLabelClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            var person        = sender.ToString().Substring(38).Split(' ');
            var personName    = person[0];
            var personSurname = person[1];

            db.getLastUser().isLast = 0;

            var query = from user in db.Users
                        where user.name == personName
                        select user;

            foreach (var item in query)
            {
                item.isLast = 1;
            }

            db.SaveChanges();
            Choose.Show();
            currentUser = db.getLastUser();
        }
Example #8
0
 //
 // Korisnik se ulogovao sa vec ulogovanim nalogom
 //
 private void buttonContinue_Click(object sender, EventArgs e)
 {
     Choose.Show();
     SignUp.Show();
 }
Example #9
0
 public GoblinBat()
 {
     InitializeComponent();
     Activate((int)Choose.Show("Please Select the Button You Want to Proceed. . .", "ShareInvest GoblinBat Kospi200 TradingSystem", "Trading", "BackTest", "Exit"));
 }
Example #10
0
 public Kospi200()
 {
     InitializeComponent();
     GetTermsAndConditions();
     Trading(ChooseResult(Choose.Show("Please Select the Button You Want to Proceed. . .", "ShareInvest GoblinBat Kospi200 TradingSystem", "Trading", "BackTest", "Exit")));
 }
Example #11
0
 public GoblinBat()
 {
     InitializeComponent();
     ChooseResult(Choose.Show("Please Select the Button You Want to Proceed. . .", "ShareInvest GoblinBat Kosdaq150 TradingSystem", "Trading", "BackTest", "Exit"));
 }