Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.

    BertrandNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by judysamnt7, 03-13-2023, 09:11 AM
    4 responses
    59 views
    0 likes
    Last Post DynamicTest  
    Started by ScottWalsh, Today, 06:52 PM
    4 responses
    36 views
    0 likes
    Last Post ScottWalsh  
    Started by olisav57, Today, 07:39 PM
    0 responses
    7 views
    0 likes
    Last Post olisav57  
    Started by trilliantrader, Today, 03:01 PM
    2 responses
    21 views
    0 likes
    Last Post helpwanted  
    Started by cre8able, Today, 07:24 PM
    0 responses
    10 views
    0 likes
    Last Post cre8able  
    Working...
    X