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

Day bars in a bar series

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

    Day bars in a bar series

    I am using the following in my script:

    Add(PeriodType.Day, 1);

    This will add a bar series of 1 bar per day. My question is are these day bars for a calendar day (midnight to midnight local time) or are they for a session day (session time start to session time end)? What I need is a "session day bar" series where each bar is 1 session, regardless of the calendar day. Can you help me with that?

    Thanks!
    Bryan
    cassb
    NinjaTrader Ecosystem Vendor - Logical Forex

    #2
    Hello cassb,

    Thanks for your note.

    For a data series with a daily interval selected the instrument will be forced to use the session times of the data provider.
    For these cases, as a workaround, you can set the interval to minute and the value to 1440. This will allow you to use the instrument session and will still be a day long interval.

    Below is a link to the help guide on Multi-Time-Frame & Instruments. In the section 'True Event Driven OnBarUpdate() Method' there is an explanation for how sessions are applied to data series, in the notes, under note 2.
    http://www.ninjatrader.com/support/h...nstruments.htm


    Please let me know if I can be of further assistance.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_ChelseaB View Post
      For a data series with a daily interval selected the instrument will be forced to use the session times of the data provider.
      For these cases, as a workaround, you can set the interval to minute and the value to 1440. This will allow you to use the instrument session and will still be a day long interval.
      Thank you, Chelsea. I'm not following you -- are you saying that my data series that I added does indeed cover the session times rather than a calendar "day"? That is what I want. For example, in my time zone, the Forex session begins and ends at 6pm EST. So I want my bars in that series to each contain 1 bar from the 6pm to 6pm time frame (not from 12am to 12am).

      Is that what it's doing?

      Or are you saying I should use this instead to get "day bars" that cover the session time range?

      Add(PeriodType.Minute, 1440);

      Thanks!
      Bryan
      Last edited by cassb; 02-07-2013, 09:18 AM.
      cassb
      NinjaTrader Ecosystem Vendor - Logical Forex

      Comment


        #4
        Hello cassb,

        -- are you saying that my data series that I added does indeed cover the session times rather than a calendar "day"?
        Or are you saying I should use this instead to get "day bars" that cover the session time range?

        Add(PeriodType.Minute, 1440);
        I am suggesting you do the latter. Using "Add(PeriodType.Minute, 1440);" will give you a day bar series that uses the session template.
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by PaulMohn, Today, 12:36 PM
        2 responses
        16 views
        0 likes
        Last Post PaulMohn  
        Started by Conceptzx, 10-11-2022, 06:38 AM
        2 responses
        53 views
        0 likes
        Last Post PhillT
        by PhillT
         
        Started by Kaledus, Today, 01:29 PM
        0 responses
        4 views
        0 likes
        Last Post Kaledus
        by Kaledus
         
        Started by yertle, Yesterday, 08:38 AM
        8 responses
        37 views
        0 likes
        Last Post ryjoga
        by ryjoga
         
        Started by rdtdale, Today, 01:02 PM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_LuisH  
        Working...
        X