/* * QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. * Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ using System; using QuantConnect.Data.Market; using System.Collections.Generic; namespace QuantConnect.ToolBox.RandomDataGenerator { /// /// Describes main methods for /// public interface ITickGenerator { /// /// Generates and enumerates data points for current symbol /// IEnumerable GenerateTicks(); /// /// Generates a random that is at most the specified away from the /// previous price and is of the requested /// /// The time of the generated tick /// The type of to be generated /// The maximum percentage to deviate from the /// previous price, for example, 1 would indicate a maximum of 1% deviation from the /// previous price. For a previous price of 100, this would yield a price between 99 and 101 inclusive /// A random value that is within the specified /// from the previous price Tick NextTick( DateTime dateTime, TickType tickType, decimal maximumPercentDeviation ); /// /// Generates a random suitable for use as a tick's emit time. /// If the density provided is , then at least one tick will be generated per step. /// If the density provided is , then at least one tick will be generated every 5 steps. /// if the density provided is , then at least one tick will be generated every 50 steps. /// Times returned are guaranteed to be within market hours for the specified Symbol /// /// The previous tick time /// The requested resolution of data /// The requested data density /// A new that is after according to the specified /// and specified DateTime NextTickTime(DateTime previous, Resolution resolution, DataDensity density); } }