示例#1
0
        /// <summary>
        /// Terminates Rezef trading session
        /// </summary>
        /// <param name="sessionId">session id</param>
        /// <param name="Account">account no.</param>
        /// <param name="Branch">branch no.</param>
        /// <returns>A <see cref="System.Int32"/>
        ///  0 : Rezef session terminated successfully.
        /// -1 : General function failure.
        /// -2 : Inadequate user permissions.</returns>
        public virtual int StopRezefSession(int sessionId, string Account, string Branch)
        {
            // i need an accurate cleanup - market simulation is far from trivial
            if (marketSimulationRezef != default(JQuant.MarketSimulationRezef))
            {
                // disconnect market simulation from the data generator in
                // it is done in the OrdersStreamStop

                marketSimulationRezef.Dispose();
                marketSimulationRezef = default(JQuant.MarketSimulationRezef);
            }

            return(0);
        }
        /// <summary>
        /// Terminates Rezef trading session
        /// </summary>
        /// <param name="sessionId">session id</param>
        /// <param name="Account">account no.</param>
        /// <param name="Branch">branch no.</param>
        /// <returns>A <see cref="System.Int32"/>  
        ///  0 : Rezef session terminated successfully.
        /// -1 : General function failure.
        /// -2 : Inadequate user permissions.</returns>
        public virtual int StopRezefSession(int sessionId, string Account, string Branch)
        {
            // i need an accurate cleanup - market simulation is far from trivial
            if (marketSimulationRezef != default(JQuant.MarketSimulationRezef))
            {
                // disconnect market simulation from the data generator in
                // it is done in the OrdersStreamStop

                marketSimulationRezef.Dispose();
                marketSimulationRezef = default(JQuant.MarketSimulationRezef);
            }

            return 0;
        }