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 Max238, Today, 01:28 AM
        2 responses
        26 views
        0 likes
        Last Post NinjaTrader_ChristopherJ  
        Started by Shansen, 08-30-2019, 10:18 PM
        25 responses
        949 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by JonesJoker, 04-22-2024, 12:23 PM
        8 responses
        41 views
        0 likes
        Last Post JonesJoker  
        Started by timko, Today, 06:45 AM
        0 responses
        4 views
        0 likes
        Last Post timko
        by timko
         
        Started by Waxavi, 04-19-2024, 02:10 AM
        2 responses
        39 views
        0 likes
        Last Post poeds
        by poeds
         
        Working...
        X