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

Getting the hourly bar open value for an indicator in market analyzer

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

    Getting the hourly bar open value for an indicator in market analyzer

    Probably a beginner question.

    I am trying to create a simple indicator for the market analyzer to show the netchange for the current hourly bar. When I set the indicator as a column in the Market analyzer and choose 60 minutes in the Data series section the value is based on the last 60 minutes instead of the hourly bar.

    How do I get the data for the current hourly bar (9:00 to 10:00 etc.) instead of the last 60 minutes?

    #2
    Hello bigtrader,

    Welcome to the NinjaTrader forums!

    If you want to get a value from a time that you specify, you can see this reference sample for help with GetBar()

    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Thanks for your reply.

      I don't really want to get the value at a specific time. I just want to indicator to work as a column in Market analyzer in the same way as on the chart.

      I want it to be based on an hourly data series instead of the last 60 minutes as is happening in market analyzer right now.

      Comment


        #4
        The start and end time of the market analyzer bars is based on the session template applied. You can check this with the Right Click > Properties screen.

        It may be a matter of aligning the chart session template with the market analyzer session template.

        Then, CalculateOnBarClose settings could impact this as well. If set to false, then it looks at the in-process bar, which is time stamped according to the last tick. If set to true, then it looks at the last completed bar.
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          Thanks. Works now. The issue was with setting the session template.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by xiinteractive, 04-09-2024, 08:08 AM
          2 responses
          10 views
          0 likes
          Last Post xiinteractive  
          Started by Irukandji, Today, 09:34 AM
          1 response
          3 views
          0 likes
          Last Post NinjaTrader_Clayton  
          Started by RubenCazorla, Today, 09:07 AM
          1 response
          5 views
          0 likes
          Last Post RubenCazorla  
          Started by TraderBCL, Today, 04:38 AM
          3 responses
          25 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by WeyldFalcon, 08-07-2020, 06:13 AM
          11 responses
          1,423 views
          0 likes
          Last Post jculp
          by jculp
           
          Working...
          X