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 lorem, Today, 09:18 AM
        1 response
        3 views
        0 likes
        Last Post lorem
        by lorem
         
        Started by bmartz, Today, 09:30 AM
        0 responses
        1 view
        0 likes
        Last Post bmartz
        by bmartz
         
        Started by GussJ, 03-04-2020, 03:11 PM
        14 responses
        3,244 views
        0 likes
        Last Post GussJ
        by GussJ
         
        Started by ArkansasClint, Today, 09:28 AM
        0 responses
        0 views
        0 likes
        Last Post ArkansasClint  
        Started by hazylizard, Today, 08:38 AM
        4 responses
        12 views
        0 likes
        Last Post hazylizard  
        Working...
        X