コード例 #1
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();
            }
        }
コード例 #2
0
 public Temporary(int type)
 {
     memo              = new List <string>(32768);
     act               = new Action(() => Save());
     this.type         = type > 0 ? @"\TickChart\Kosdaq150\" : @"\TickChart\Kospi200\";
     api               = Futures.Get();
     api.SendMemorize += OnReceiveMemorize;
 }
コード例 #3
0
        public Balance()
        {
            InitializeComponent();

            gap = chart.Series["Revenue"];

            Futures.Get().SendBalance += Make;
        }
コード例 #4
0
        public GoblinBat()
        {
            InitializeComponent();

            api = Futures.Get();

            new Statistics();
            new Temporary();

            timer.Start();
            api.SetAPI(axAPI);
            api.StartProgress();
            api.SendExit += OnReceiveExit;
        }
コード例 #5
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);
            }
        }
コード例 #6
0
        public IEnumerator GetEnumerator()
        {
            string[] files = Directory.GetFiles(Environment.CurrentDirectory, "*.csv", SearchOption.AllDirectories), arr;

            foreach (string file in Array.FindAll(files, o => o.Contains("TickChart")))
            {
                list = ReadCSV(file, new List <string>(2097152));

                foreach (string val in list)
                {
                    yield return(val);
                }

                arr = list.Last().Split(',');

                Futures.Get().Retention = arr[0];
            }
        }
コード例 #7
0
ファイル: Revenue.cs プロジェクト: w1r2p1/GoblinBat
        public Revenue(int type)
        {
            this.type   = type;
            b           = new BollingerBands(20, 2);
            ema         = new EMA(5, 60);
            sma         = new double[b.MidPeriod];
            trend_width = new List <double>(32768);
            short_ema   = new List <double>(32768);
            long_ema    = new List <double>(32768);
            shortDay    = new List <double>(512);
            longDay     = new List <double>(512);
            Send       += Analysis;

            foreach (string rd in new Daily(type))
            {
                arr = rd.Split(',');

                if (arr[1].Contains("-"))
                {
                    arr[1] = arr[1].Substring(1);
                }

                Send?.Invoke(this, new Datum(arr[0], double.Parse(arr[1])));
            }
            foreach (string rd in new Tick(type))
            {
                arr = rd.Split(',');

                if (arr[1].Contains("-"))
                {
                    arr[1] = arr[1].Substring(1);
                }

                Send?.Invoke(this, new Datum(arr[0], double.Parse(arr[1]), int.Parse(arr[2])));
            }
            Send     -= Analysis;
            arr       = SetSecret(type).Split('^');
            Secret    = int.Parse(arr[0]);
            Tick      = int.Parse(arr[1]);
            api       = Futures.Get();
            api.Send += Analysis;
        }
コード例 #8
0
        public Statistics()
        {
            b           = new BollingerBands(20, 2);
            ema         = new EMA(5, 60);
            sma         = new double[b.MidPeriod];
            trend_width = new List <double>(32768);
            short_ema   = new List <double>(32768);
            long_ema    = new List <double>(32768);
            shortDay    = new List <double>(512);
            longDay     = new List <double>(512);
            Send       += Analysis;

            foreach (string rd in new Daily())
            {
                string[] arr = rd.Split(',');

                if (arr[1].Contains("-"))
                {
                    arr[1] = arr[1].Substring(1);
                }

                Send?.Invoke(this, new Datum(arr[0], double.Parse(arr[1])));
            }
            foreach (string rd in new Tick())
            {
                string[] arr = rd.Split(',');

                if (arr[1].Contains("-"))
                {
                    arr[1] = arr[1].Substring(1);
                }

                Send?.Invoke(this, new Datum(arr[0], double.Parse(arr[1]), int.Parse(arr[2])));
            }
            Send     -= Analysis;
            api       = Futures.Get();
            api.Send += Analysis;
        }
コード例 #9
0
ファイル: Scalping.cs プロジェクト: w1r2p1/GoblinBat
        public Scalping(int type, int se, int le)
        {
            this.type = type;
            ema       = new EMA(se, le);
            short_ema = new List <double>(32768);
            long_ema  = new List <double>(32768);
            Send     += Analysis;

            foreach (string rd in new Daily(type))
            {
                arr = rd.Split(',');

                if (arr[1].Contains("-"))
                {
                    arr[1] = arr[1].Substring(1);
                }

                Send?.Invoke(this, new Datum(arr[0], double.Parse(arr[1])));
            }
            foreach (string rd in new Tick(type))
            {
                arr = rd.Split(',');

                if (arr[1].Contains("-"))
                {
                    arr[1] = arr[1].Substring(1);
                }

                Send?.Invoke(this, new Datum(arr[0], double.Parse(arr[1]), int.Parse(arr[2])));
            }
            Send     -= Analysis;
            arr       = SetSecret(type).Split('^');
            Secret    = int.Parse(arr[0]);
            api       = Futures.Get();
            api.Send += Analysis;
        }
コード例 #10
0
ファイル: Confirm.cs プロジェクト: w1r2p1/GoblinBat
        private Confirm()
        {
            InitializeComponent();

            Futures.Get().SendConfirm += OnReceiveIdentify;
        }