Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Second IDataSeries as an argument to the Indicator

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Second IDataSeries as an argument to the Indicator

    Are there a way to get a second (or more) IDataSeries entered similar way as that first one to the indicator?

    Inside program it is Ok, but how to pop up the screen to enter needed Input ?

    Similar to Indicators .. - Data: Input Series -> pop up the screen ...

    Program as an example:

    namespace NinjaTrader.Indicator
    {
    /// <summary>
    /// </summary>
    [Description("Hello from DS")]
    public class DSTest : Indicator
    {
    #region Variables
    // Wizard generated variables
    private IDataSeries secondDataSeries;
    // User defined variables (add any user defined variables below)
    #endregion

    /// <summary>
    /// This method is used to configure the indicator and is called once before any bar data is loaded.
    /// </summary>
    protected override void Initialize()
    {
    }

    /// <summary>
    /// </summary>
    protected override void OnBarUpdate()
    {
    // Use this method for calculating your indicator values. Assign a value to each
    // plot below by replacing 'Close[0]' with your own formula.

    Print(Input[0]); // from first IDataSeries, can be defined from Indicator -> Data -> Input series
    Print(secondDataSeries[0]); // null now or how to enter input series!?

    }

    #region Properties

    [Description("")]
    [GridCategory("Parameters")]
    public IDataSeries SecondDataSeries
    {
    get { return secondDataSeries; }
    set { secondDataSeries = value; }
    }
    #endregion
    }
    }

    #2
    raffu, from the main UI it would only be one Input series driving the study. The only item we could support here is adding series in via the Add() method - you can then make user inputs for the period, type and instrument symbol used.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    25 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    19 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    182 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    335 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    260 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X