public Strategy(IStatistics st) { ema = new EMA(); bands = st.Base > 1 && st.Sigma > 0 && st.Percent > 0 && st.Max > 0 ? true : false; days = st.ShortDayPeriod > 1 && st.LongDayPeriod > 2 ? true : false; count = st.Quantity + 1; Headway = st.Time; if (bands) { over = new BollingerBands(st.Sigma * 0.1, st.Base, st.Percent, st.Max); baseTick = new List <double>(2097152); } if (days) { shortDay = new List <double>(512); longDay = new List <double>(512); } shortTick = new List <double>(2097152); longTick = new List <double>(2097152); Send += Analysis; this.st = st; GetChart(); Send -= Analysis; api = ConnectAPI.Get(); api.SendDatum += Analysis; balance = Balance.Get(); SendLiquidate += balance.OnReceiveLiquidate; }
public ConnectKHOpenAPI() { InitializeComponent(); api = ConnectAPI.Get(); api.SetAPI(axAPI); api.StartProgress(new RealType(), new DataBaseConnect().GetConnectString()); }
public ConnectKHOpenAPI() { InitializeComponent(); api = ConnectAPI.Get(); api.SetAPI(axAPI); api.StartProgress(new RealType()); }
private void OnReceiveAccount(object sender, Account e) { account.Text = e.AccNo; id.Text = e.ID; ConnectAPI api = ConnectAPI.Get(); api.SendDeposit += OnReceiveDeposit; api.LookUpTheDeposit(e.AccNo, true); }
private void TimerTick(object sender, EventArgs e) { ConnectAPI api = ConnectAPI.Get(); api.LookUpTheDeposit(account.Text, api.OnReceiveBalance); if (DateTime.Now.Hour > 14 && DateTime.Now.Minute > 44) { timer.Stop(); } }
private void OnReceiveAccount(object sender, Account e) { if (e.Server.Equals("1")) FormSizes[2, 0] = 594; account.Text = e.AccNo; id.Text = e.ID; Api = ConnectAPI.Get(); Api.SendDeposit += OnReceiveDeposit; Api.LookUpTheDeposit(e.AccNo, true); }
private Balance() { InitializeComponent(); balGrid.ColumnCount = 7; balGrid.BackgroundColor = Color.FromArgb(121, 133, 130); api = ConnectAPI.Get(); api.SendHolding += OnReceiveBalance; for (int i = 0; i < columns.Length; i++) { balGrid.Columns[i].Name = columns[i]; } }
public Strategy(IStatistics st) { ema = new EMA(); shortDay = new List <double>(512); longDay = new List <double>(512); shortTick = new List <double>(2097152); longTick = new List <double>(2097152); Send += Analysis; this.st = st; GetChart(); Send -= Analysis; api = ConnectAPI.Get(); api.SendDatum += Analysis; SendLiquidate += Balance.Get().OnReceiveLiquidate; }
private ConfirmOrder() { InitializeComponent(); api = ConnectAPI.Get(); api.SendConfirm += OnReceiveIdentify; }
public AccountSelection() { InitializeComponent(); ConnectAPI.Get().SendAccount += OnReceiveAccount; }