• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.


No announcement yet.

Partner 728x90


indicator plot values

  • Filter
  • Time
  • Show
Clear All
new posts

    indicator plot values

    Hello i am working on an indicator X which will expose some values so that the indicator can then be called from a strategy or other indicator
    To be able to access these values in strategy builder the plots need to be defined. Is it correct that the plot series returned from indicator X can only be defined as
    series<double> type - ie if i want to return some boolean or enum based values as Plots (to be accessible in strategy builder) i presume i need to convert/translate those to integer/decimal values ie for the boolean 1 or 0 and enums 1 2 3 4 etc - knowing which is which. Will strategy builder or otherwise and plots ever support returning values for bars that are not just series<double> ?
    I presume the same applies to market analyser columns and conditions based on the indicator X as well.

    The ninjascript editor i thought in past had more provision to automate generating code ie say i want to do a moving average of data exported from indicator X? Seems the code stub 'could' be generated in strategy builder - and cut paste ? any reason why ninjascript indicator editor doesnt provide the same building process ? was this not how it was in NT7?


    Hello explorer101,

    This would be limitations of the Strategy Builder and the New Indicator Wizard.

    The New Indicator Wizard plots are only doubles (in the Values). For the strategy builder specifically to call an indicator series it must be a plot.

    The custom series can be bools, doubles, strings, or datetimes, but these are not public.

    If you wanted these to be public the script would need to be unlocked, and these series would need to be changed to public and have the [XmlIgnore()] attribute applied.

    Then the strategy would also need to be unlocked to call these public series in the indicator (as only plots can be used in the Strategy Builder)

    So while what you want to achieve is possible, it would have to be coded by hand.

    Are you referring to the Insert Code Snippet?
    Last edited by NinjaTrader_ChelseaB; 10-17-2019, 07:15 AM.
    Chelsea B.NinjaTrader Customer Service


      Hello thanks for reply.

      When you say above 'if you wanted these to be public the script .....' are you referring to Indicator X code (which the user would not see as would be imported as addon assembly) ?

      I understand in the code for the strategy or indicator calling and making reference to indicator X that i/user would need to unlock code to access other values.
      So those custom series in indicator X would be made public and be aligned with the bars index of chart bars?
      So if i specifically wanted to return a bool series i would make it custom and public with XMLIgnore() and the user would then access this in the code.

      I believe i follow what you are saying in that only Plots can be accessed in the strategy builder.

      Regarding the current version of the indicator editor 'wizard' my question was are there plans to combine and include the condition builder component that is part of the strategy builder into the indicator builder. In its current form it is quite basic and rudimentary defining inputs and plots but no access to reference other indicators.



        Hello explorer101,

        Yes, in the indicator that is creating the series you want to call from an external script.

        A custom series added on the Additional Data page of the Indicator Wizard (or the Strategy Builder) adds the new Series<T> as a private series so it is not accessible from outside of the class.

        This would need to be changed to public to be called from outside of the class (like the way inputs work).

        Yes, series have 1 bar slot for every bar of the primary series.

        Yes, this would need the [XmlIgnore()] attribute applied to prevent errors when saving the workspace or a template (.xml files).

        Yes, this would allow the indicator to be called from another script and provide a bool series, or string series, etc.

        You are able to reference other indicators from the Strategy Builder.

        Custom series in an indicator that are not plots cannot be accessed from the Strategy Builder.

        There are no plans at this time to change the Strategy Builder to work with custom series.
        The strategy builder is limited in functionality to simple comparisons. For any math, counting, or custom logic (such as using a bool series or string series) would require the strategy to be unlocked and coded by hand.
        Chelsea B.NinjaTrader Customer Service


          thanks chelsea for the clarifications on the series.
          Not sure if you misunderstood my last question - it was more related to the current Indicator wizard in the ninjascript editor being expanded to include the condition builder piece that exists in the strategy builder? make sense?


            Hello explorer101,

            I will submit a feature request on your behalf for an Indicator Builder (in addition to the Indicator Wizard).

            Once I have a tracking ID for this request I will post in this thread for future reference.
            Chelsea B.NinjaTrader Customer Service


              thanks for response - im surprised this is not there already as thought it would be a re-useable component from the strategy builder.
              As i mentioned at start - users can use the strategy builder to get code segments based on the conditional logic piece in the conditional builder open the code and cut paste.
              This is not specifically needed by me but potentially other users who are less familiar with coding and want the conditional piece in the indicator wizard


                Hello, did they come back with any tracking ID on this ?


                  Hello explorer101,

                  Thank you for your reply.

                  I'm responding on behalf of Chelsea, who is out of the office today.

                  We have added a vote for you to a current feature request to create Strategy Builder style interfaces for more objects, such as Indicators. This request is being tracked under the number SFT-1557.

                  As with all feature requests, interest is tracked before implementation is considered, so we cannot offer an ETA or promise of fulfillment. If implemented, it will be noted in the Release Notes page of the Help Guide.

                  Release Notes — https://ninjatrader.com/support/help...ease_notes.htm

                  Please let us know if we may be of further assistance to you.
                  Kate W.NinjaTrader Customer Service


                  Latest Posts


                  Topics Statistics Last Post
                  Started by JTizz, Today, 08:17 AM
                  5 responses
                  Last Post JTizz
                  by JTizz
                  Started by Johnny Santiago, 07-30-2020, 07:30 PM
                  9 responses
                  Last Post brucerobinson  
                  Started by Jorge.andres.o, Yesterday, 03:44 PM
                  2 responses
                  Last Post NinjaTrader_ChelseaB  
                  Started by Rastus, Yesterday, 10:27 PM
                  1 response
                  Last Post NinjaTrader_PaulH  
                  Started by jonfan45, Today, 01:25 AM
                  1 response
                  Last Post NinjaTrader_PaulH