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

Applying indicator to Globex or no Globex data

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

    Applying indicator to Globex or no Globex data

    Hello,

    I have a classical question I guess. I would like to use in a strategy the value of some moving averages applied on globex data for some of them or on non globex data for others (but all on the same underlying contract).

    What would be the best way to do that? Applying a template to the strategy will allow us to apply the indicator on globex or non globex, but how can we access in the same strategy the other template.

    Many thanks for your help.

    Kind Regards.

    #2
    Hello AlgoNaute,

    We hope to allow more flexibility regarding this in the future, like setting programatically the session template used for added series.

    Your can custom code this, only calculating indicator values if the bar stamps are within your time range. A sample similar to this is available here:


    You may also consider creating a new instrument only for session template distinction from the main instrument. This instrument has all the same settings as the one it's based on, but a different master instrument name.

    The rules governing what session template is used in a multiseries script is available below:

    If a multi-series script adds an additional Bars object that already exists on the chart, the script will use the preexisting series instead of creating a new one to conserve memory. This includes that series' session template as applied from the chart. If the Bars object does not exist on the chart, the session template of the added Bars object will be the session template of the primary Bars object. If the primary Bars object is using the "<Use instrument settings>" session template then the additional Bars objects will use the default session templates as defined for their particular instruments in the Instrument Manager.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      It seems that create a specific non globex instrument would be the less complex. But how can we create a new instrument? If I try throuig instrument manager to insert an already selected instrument it does not work, as the instrument already exists on this name.

      Second question, if I try to access the non globex instrument out of the non globex hours (during the night), how can I access the good close value. Is the indicators applied to the instrument non globec at index 0 will return the appropriate value?

      Many thanks for your help.

      Comment


        #4
        Disclaimer here: This is provided as a work around rather than an official technique. As such, much of the implementation will be on your own to work out.

        Help for adding instruments to the instrument manager is available here.
        The master instrument name must be unique, but you can use the same symbol mapping and exchange settings with a different master instrument name and different session template. Call it CUSTOMES or something to distinguish from the master instrument.

        This is a multiseries implementation and the same rules apply as other multiseries scripts:


        Once you setup your instrument and work it into a multiseries strategy, you'll have to Print() or set plots to check the values you're getting.
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          Thanks again for the clarifications and fast answers.

          However, I think being able to pass template as parameter indicator is definitly a must have functionality. Most basic platforms allow to deal with this in a supported and easy way, so it is quite strange Ninja does not.

          Comment


            #6
            Yes, that would make a nice feature and avoid a lot of the challenges involved in custom coding calculations or creating another instrument. Thanks for the suggestion. It's added in our internal tracking system with ID # 957
            Ryan M.NinjaTrader Customer Service

            Comment


              #7
              Is there a way to follow this on our side?

              Comment


                #8
                Currently we aren't publishing the complete list or status updates. If you have questions in the future about it you can use the number provided for reference.
                Ryan M.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by jaybedreamin, Today, 05:56 PM
                0 responses
                2 views
                0 likes
                Last Post jaybedreamin  
                Started by DJ888, 04-16-2024, 06:09 PM
                6 responses
                18 views
                0 likes
                Last Post DJ888
                by DJ888
                 
                Started by Jon17, Today, 04:33 PM
                0 responses
                1 view
                0 likes
                Last Post Jon17
                by Jon17
                 
                Started by Javierw.ok, Today, 04:12 PM
                0 responses
                6 views
                0 likes
                Last Post Javierw.ok  
                Started by timmbbo, Today, 08:59 AM
                2 responses
                10 views
                0 likes
                Last Post bltdavid  
                Working...
                X