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

Multiple Indicators input for another indicator

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

    Multiple Indicators input for another indicator

    Hi,

    I am trying to make a indicator based on multiple other indicators input.

    A this point, I hard code the indicators I need (for ex CCI/RSI/...).

    I would like the user to chose dynamically the list of indicators input (periods, fast/low results etc..) like the data series input of any ninja indicator.

    I use something like :

    Code:
    ..
    private IndicatorBase inputIndicator1;
    ..
    
    [XmlIgnore()]
    [Description("Indicator 1 input data")]
    [Category("Parameters")]
    [Gui.Design.DisplayName("Indicator 1")]
    public NinjaTrader.Indicator.IndicatorBase InputIndicator1 {
        get { return inputIndicator1; }
        set { inputIndicator1 = value; }
    }
    But... I need to serialize this for this to work.
    Is this possible ?
    If no, will it be possible with version 8 ?

    Thank you.

    W.

    #2
    Hi Wingman,

    Thank you for posting.

    While you wouldn't use a Serialize for the Indicator you would instead create a ENUM.
    Example:
    Code:
    public enum MASelection
    {
         EMA,
         HMA,
         WMA,
         SMA,
    }
    Another good example is the Moving Average Cross Builder indicator from our support forum that shows how create the ENUM and how it works when calling variables.
    http://www.ninjatrader.com/support/f...tid=-1&lpage=1

    Please let me know if I can be of further assistance.
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Thank you Cal.

      It seems my question was not clear.

      The enum allows to hard code the indicators. This is precisely what I would like to avoid.

      I would like the user to choose the input series. like it is available in any Ninja indicator when opening the Indicators parameters data section input series.

      Is this possible ?

      Thank you,

      W.

      Comment


        #4
        Hi Wingman,

        Thank you for the clarification.

        This would be possible to do however this would be unsupported by NinjaTrader.

        I will keep this forum open for any of our users that have experience in this matter and would like to comment.

        Please let me know if I can be of further assistance.
        Cal H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by arvidvanstaey, Today, 02:19 PM
        0 responses
        2 views
        0 likes
        Last Post arvidvanstaey  
        Started by mmckinnm, Today, 01:34 PM
        3 responses
        5 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by f.saeidi, Today, 01:32 PM
        2 responses
        5 views
        0 likes
        Last Post f.saeidi  
        Started by alifarahani, 04-19-2024, 09:40 AM
        9 responses
        55 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by Conceptzx, 10-11-2022, 06:38 AM
        3 responses
        60 views
        0 likes
        Last Post NinjaTrader_SeanH  
        Working...
        X