/* * 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; namespace QuantConnect { /// /// Provides an abstraction for managing isolator limit results. /// This is originally intended to be used by the training feature to permit a single /// algorithm time loop to extend past the default of ten minutes /// public interface IIsolatorLimitResultProvider { /// /// Determines whether or not a custom isolator limit has be reached. /// IsolatorLimitResult IsWithinLimit(); /// /// Requests additional time from the isolator result provider. This is intended /// to prevent from returning an error result. /// This method will throw a if there is insufficient /// resources available to fulfill the specified number of minutes. /// /// The number of additional minutes to request void RequestAdditionalTime(int minutes); /// /// Attempts to request additional time from the isolator result provider. This is intended /// to prevent from returning an error result. /// This method will only return false if there is insufficient resources available to fulfill /// the specified number of minutes. /// /// The number of additional minutes to request bool TryRequestAdditionalTime(int minutes); } }