Exemplo n.º 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;
        }
Exemplo n.º 2
0
 public ConnectKHOpenAPI(IConfirm confirm, IStrategy st)
 {
     InitializeComponent();
     api = PublicFutures.Get();
     new Strategy(st);
     new Temporary().Send += OnReceiveExit;
     api.SetAPI(axAPI);
     api.StartProgress(confirm, st);
     api.SendExit += OnReceiveExit;
 }
Exemplo n.º 3
0
 private void StartProgress()
 {
     using (ChooseSelectButton sb = new ChooseSelectButton(PublicFutures.Get()))
     {
         panel.Controls.Add(sb);
         sb.Dock       = DockStyle.Fill;
         StartPosition = FormStartPosition.CenterScreen;
         sb.SendQuit  += OnReceiveDialogClose;
         ShowDialog();
     }
     Environment.Exit(0);
 }
Exemplo n.º 4
0
        private ConfirmOrder()
        {
            InitializeComponent();

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