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

How to restrict bar data to only that for the current session

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

    How to restrict bar data to only that for the current session

    I have noticed that there are times when even if the Days to Load setting in the Data Series of my MES chart is set to 0 (Load data based on: Days), the data loaded in the chart is that of 2 days or two sessions to be precise. I have tried different ways to restrict the bar data to only that of the current session but without avail. Is there a way to accomplish this?

    #2
    Hi mbesha, thanks for your post.

    For a chart, the data is loaded literally based on days. So if I made a chart with 1 day on it right now, exactly 24 hours worth of bars will be printed to the chart. In a script, one could detect the beginning bar of a session using FirstBarOfSession, or in NinjaTrader 8 use a Session Iterator to partition data by session.

    For visual confirmation of session begin/end you can set a unique color for the Session Break Line in the DataSeries menu.

    Please let me know if you have any further questions.
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Hi ChrisL. Does that mean that a chart will always have a minimum of 24 hours worth of bars? Is it possible to display less than that? I am aware of the ways of detecting the start of a session but I am concerned in the chart data on display.

      Comment


        #4
        Hello mbesha,

        Thanks for your post.

        Another option would be to change the data series parameter "Load data based on" from "days" to "bars" and then specify the number of historical bars you want to see the chart start with. Please note that as new bars come in they will add to (the count of) initial bars to load for period that you are connected to real time data. When you restart Ninjatrader, the chart would then again only load the number of bars specified.

        Reference: "How to edit Data Series parameters" : https://ninjatrader.com/support/help...price_data.htm
        Paul H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Brevo, Today, 01:45 AM
        0 responses
        2 views
        0 likes
        Last Post Brevo
        by Brevo
         
        Started by aussugardefender, Today, 01:07 AM
        0 responses
        3 views
        0 likes
        Last Post aussugardefender  
        Started by pvincent, 06-23-2022, 12:53 PM
        14 responses
        238 views
        0 likes
        Last Post Nyman
        by Nyman
         
        Started by TraderG23, 12-08-2023, 07:56 AM
        9 responses
        384 views
        1 like
        Last Post Gavini
        by Gavini
         
        Started by oviejo, Today, 12:28 AM
        0 responses
        4 views
        0 likes
        Last Post oviejo
        by oviejo
         
        Working...
        X