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

nt not displaying range for current session.

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

    nt not displaying range for current session.




    people with nt,



    i have created a simple indicator that should calculate and display the range as high - low. this seems to work well for historical data. however, for the current session, nt will display n/a. once the session is over, the range will be displayed correctly. it should be obvious that the current session is always the most important data point so i want to know how can this be fixed so the range for all dates, including the current session can be correctly displayed.



    also, ¿how can i calculate the range as high - low but only for the data between 09:30 and 16:00 eastern yankee time? please provide a working sample of the code required.
    Last edited by rtwave; 12-02-2023, 01:32 PM.

    #2
    Hello rtwave,

    Thanks for your post.

    Please share a simple test script demonstrating how you are calculating the High[0] - Low[0] and it displaying as N/A so we may accurately assist.

    You could create a Time Filter in your script if you want to limit logic in your script to occur only during a certain time. Within that Time Filter condition you could calculate High[0]-Low[0] to get the range of the bar.

    See the 'how to create time filters' section' of this help guide page detailing how to create Time Filters: https://ninjatrader.com/support/help...on_builder.htm

    And, see this reference sample: https://ninjatrader.com/support/help...to_limit_t.htm
    Brandon H.NinjaTrader Customer Service

    Comment


      #3


      people with nt,



      this is the situation i'm referring to:


      Click image for larger version

Name:	20231205 nt malfunction 0001.jpg
Views:	55
Size:	157.0 KB
ID:	1280985




      i'm using exactly the range indicator that is part of the nt platform.



      and for other indicators i have created that include the same calculation of high0 - low0 the same malfunction will be observed.



      on the subject of time filters, i'm pretty sure that it will not be possible to apply time filters to daily data. however, i have found the different session templates and those could possibly work.

      Comment


        #4
        Hello rtwave,

        Thanks for your notes.

        If you are hovering you mouse over the currently forming candle on the chart and see n/a reported in the Data Box, this is because the indicator has not plotted on that bar yet.

        When Calculate.OnBarClose is used, the indicator plot will display up to the last closed bar.

        To have your indicator plot values on the currently forming bar, you could set the indicator's Calculate mode to Calculate.OnPriceChange or Calculate.OnEachTick.

        See this help guide page for more information about Calculate: https://ninjatrader.com/support/help.../calculate.htm
        Brandon H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Haiasi, 04-25-2024, 06:53 PM
        2 responses
        16 views
        0 likes
        Last Post Massinisa  
        Started by Creamers, Today, 05:32 AM
        0 responses
        4 views
        0 likes
        Last Post Creamers  
        Started by Segwin, 05-07-2018, 02:15 PM
        12 responses
        1,785 views
        0 likes
        Last Post Leafcutter  
        Started by poplagelu, Today, 05:00 AM
        0 responses
        3 views
        0 likes
        Last Post poplagelu  
        Started by fx.practic, 10-15-2013, 12:53 AM
        5 responses
        5,407 views
        0 likes
        Last Post Bidder
        by Bidder
         
        Working...
        X