/* * 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 QuantConnect.Data; using QuantConnect.Data.Consolidators; using QuantConnect.Data.Market; using QuantConnect.Indicators; using System; namespace QuantConnect.Algorithm { public partial class QCAlgorithm { /// /// Registers the consolidator to receive automatic updates as well as configures the indicator to receive updates /// from the consolidator. /// /// The symbol to register against /// The indicator to receive data from the consolidator /// The resolution at which to send data to the indicator, null to use the same resolution as the subscription public void RegisterIndicator(Symbol symbol, IndicatorBase indicator, Resolution? resolution = null) { RegisterIndicator(symbol, indicator, resolution); } /// /// Registers the consolidator to receive automatic updates as well as configures the indicator to receive updates /// from the consolidator. /// /// The symbol to register against /// The indicator to receive data from the consolidator /// The resolution at which to send data to the indicator, null to use the same resolution as the subscription public void RegisterIndicator(Symbol symbol, IndicatorBase indicator, Resolution? resolution = null) { RegisterIndicator(symbol, indicator, resolution); } /// /// Registers the consolidator to receive automatic updates as well as configures the indicator to receive updates /// from the consolidator. /// /// The symbol to register against /// The indicator to receive data from the consolidator /// The consolidator to receive raw subscription data /// Selects a value from the BaseData send into the indicator, if null defaults to a cast (x => (T)x) public void RegisterIndicator(Symbol symbol, IndicatorBase indicator, Resolution? resolution, Func selector) { RegisterIndicator(symbol, indicator, resolution, selector); } /// /// Registers the consolidator to receive automatic updates as well as configures the indicator to receive updates /// from the consolidator. /// /// The symbol to register against /// The indicator to receive data from the consolidator /// The consolidator to receive raw subscription data /// Selects a value from the BaseData send into the indicator, if null defaults to a cast (x => (T)x) public void RegisterIndicator(Symbol symbol, IndicatorBase indicator, Resolution? resolution, Func selector) { RegisterIndicator(symbol, indicator, resolution, selector); } /// /// Registers the consolidator to receive automatic updates as well as configures the indicator to receive updates /// from the consolidator. /// /// The symbol to register against /// The indicator to receive data from the consolidator /// The resolution at which to send data to the indicator, null to use the same resolution as the subscription /// Selects a value from the BaseData send into the indicator, if null defaults to a cast (x => (T)x) public void RegisterIndicator(Symbol symbol, IndicatorBase indicator, TimeSpan? resolution, Func selector) { RegisterIndicator(symbol, indicator, resolution, selector); } /// /// Registers the consolidator to receive automatic updates as well as configures the indicator to receive updates /// from the consolidator. /// /// The symbol to register against /// The indicator to receive data from the consolidator /// The resolution at which to send data to the indicator, null to use the same resolution as the subscription /// Selects a value from the BaseData send into the indicator, if null defaults to a cast (x => (T)x) public void RegisterIndicator(Symbol symbol, IndicatorBase indicator, TimeSpan? resolution, Func selector) { RegisterIndicator(symbol, indicator, resolution, selector); } /// /// Registers the consolidator to receive automatic updates as well as configures the indicator to receive updates /// from the consolidator. /// /// The symbol to register against /// The indicator to receive data from the consolidator /// The consolidator to receive raw subscription data /// Selects a value from the BaseData send into the indicator, if null defaults to a cast (x => (T)x) public void RegisterIndicator(Symbol symbol, IndicatorBase indicator, IDataConsolidator consolidator, Func selector) { RegisterIndicator(symbol, indicator, consolidator, selector); } /// /// Registers the consolidator to receive automatic updates as well as configures the indicator to receive updates /// from the consolidator. /// /// The symbol to register against /// The indicator to receive data from the consolidator /// The consolidator to receive raw subscription data /// Selects a value from the BaseData send into the indicator, if null defaults to a cast (x => (T)x) public void RegisterIndicator(Symbol symbol, IndicatorBase indicator, IDataConsolidator consolidator, Func selector) { RegisterIndicator(symbol, indicator, consolidator, selector); } /// /// Plots the value of each indicator on the chart /// /// The chart's name /// The indicatorsto plot /// public void Plot(string chart, params IndicatorBase[] indicators) { Plot(chart, indicators); } /// /// Plots the value of each indicator on the chart /// /// The chart's name /// The indicatorsto plot /// public void Plot(string chart, params IndicatorBase[] indicators) { Plot(chart, indicators); } /// /// Plots the value of each indicator on the chart /// /// The chart's name /// The indicatorsto plot /// public void Plot(string chart, params IndicatorBase[] indicators) { Plot(chart, indicators); } /// /// Automatically plots each indicator when a new value is available /// public void PlotIndicator(string chart, params IndicatorBase[] indicators) { PlotIndicator(chart, indicators); } /// /// Automatically plots each indicator when a new value is available /// public void PlotIndicator(string chart, params IndicatorBase[] indicators) { PlotIndicator(chart, indicators); } /// /// Automatically plots each indicator when a new value is available /// public void PlotIndicator(string chart, params IndicatorBase[] indicators) { PlotIndicator(chart, indicators); } /// /// Automatically plots each indicator when a new value is available, optionally waiting for indicator.IsReady to return true /// public void PlotIndicator(string chart, bool waitForReady, params IndicatorBase[] indicators) { PlotIndicator(chart, waitForReady, indicators); } /// /// Automatically plots each indicator when a new value is available, optionally waiting for indicator.IsReady to return true /// public void PlotIndicator(string chart, bool waitForReady, params IndicatorBase[] indicators) { PlotIndicator(chart, waitForReady, indicators); } /// /// Automatically plots each indicator when a new value is available, optionally waiting for indicator.IsReady to return true /// public void PlotIndicator(string chart, bool waitForReady, params IndicatorBase[] indicators) { PlotIndicator(chart, waitForReady, indicators); } } }