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

Adding secondary data series with session template

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

    Adding secondary data series with session template

    Hi,

    Is it possible to add the secondary data series with different session template than primary data series?

    Can you please provide simple example of code for this?

    Thanks,
    GSREDDY

    #2
    Hi gsreddy, unfortunately you could not control this programmatically (however that's on the feedback list, will add your vote in as well) - the following considerations would apply in this area:

    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.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Originally posted by gsreddy View Post
      Hi,

      Is it possible to add the secondary data series with different session template than primary data series?

      Can you please provide simple example of code for this?

      Thanks,
      GSREDDY

      Have you tried adding a new instrument, mapped to the instrument you want, with a different session template?

      EXA: instrument ES 12-12 with CME ETH...
      create a second one, ES2 12-12 with CME RTH.. and add that one in your code.

      I haven't tested this, just theorizing. Good luck.

      let us know if it works.

      Comment


        #4
        Hi Sledge,

        thanks for the reply, your solution should work as per the design but i think we need to create the new instrument(ES2) with data to test it out.

        i have create the new session template to handle my case. created with RTH (6:30AM to 1:15 PM PST) and after hours (1:30PM to next day 6:30 AM PST) as session template.

        i have 30 min bars as primary data and added 1 tick as secondary in the code to build volume profile directory for my analyses by resetting variables/values on first bar of the session on bars in progress =1. this way i am able to access after hours values during day session.

        thanks,
        gsreddy

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by GwFutures1988, Today, 02:48 PM
        1 response
        5 views
        0 likes
        Last Post NinjaTrader_Clayton  
        Started by ScottWalsh, 04-16-2024, 04:29 PM
        6 responses
        32 views
        0 likes
        Last Post ScottWalsh  
        Started by frankthearm, Today, 09:08 AM
        10 responses
        36 views
        0 likes
        Last Post frankthearm  
        Started by mmenigma, Today, 02:22 PM
        1 response
        4 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by NRITV, Today, 01:15 PM
        2 responses
        10 views
        0 likes
        Last Post NRITV
        by NRITV
         
        Working...
        X