示例#1
0
        public void SetTInstrument(StrategyQTP strategy, TInstrument target)
        {
            this.strategy = strategy;
            this.target = target;

            barsBuffer = new List<Bar>();
            ticksBuffer = new List<Tick>();
        }
示例#2
0
文件: CRUD.cs 项目: wsjiabao/autodz
        private static List<TInstrument> GetTInstruments(int poolId)
        {
            List<TInstrument> list = new List<TInstrument>();
            using (SqlConnection connection = new SqlConnection(ConnectionString))
            {
                SqlCommand command = new SqlCommand(string.Format("SELECT * FROM PoolInstrument WHERE PoolId={0}", poolId), connection);
                command.Connection.Open();
                SqlDataReader reader = command.ExecuteReader();

                while (reader.Read())
                {
                    TInstrument ins = new TInstrument();
                    ins.Exchange = ((string)reader["Exchange"]).Trim();
                    ins.InstrumentId = ((string)reader["InstrumentId"]).Trim();
                    ins.MinPosition = (int)reader["MinPosition"];
                    ins.MonitorClass = (string)reader["MonitorClass"];
                    list.Add(ins);
                }
                command.Connection.Close();
            }

            return list;
        }
示例#3
0
文件: Monitor.cs 项目: jiangyimin/QTP
        public Monitor(MyStrategy strategy, TInstrument target, TAInfo taInfo, string dllName)
        {
            this.strategy = strategy;
            this.target = target;

            this.ta = new TA(this, taInfo, dllName);

            this.barBuffer = new List<Bar>();
            this.tickBuffer = new List<Tick>();
        }