Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Syntax for a Close within multi types on one Chart

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

    Syntax for a Close within multi types on one Chart

    I have multiple bar types on one chart- Range, Volume and time. I need to know the proper syntax for the close of a 14 Range bar. I am thinking it may look similar to :
    (Instrument, PeriodType.Range, 14,Close);
    I have looked through the Contents for NT7 but the only thing it has are for single time frames on a chart.

    #2
    Or would it be this... double ES14RangeClose = Close[0];

    Comment


      #3
      Hello RJBen,

      Thanks for your post.

      For an indicator to access other bars objects, those need to be added to the indicator (even though they may already be on the chart, the indicator only has access to the initial (base) chart series. You can add a dataseries to the script through the following:

      Add() https://ninjatrader.com/support/help.../nt7/?add3.htm

      Once the data is added to the script, you can then reference the added data series either by its BarsArray[n] or by the plural of Open, High, Low or Close. For example to refer to the first added dataseries you can use Closes[1][0] which points to the first added dataseries [1] and the current bar [0] of that data series.

      A multi-series or time frame script has many requirements and it is recommended that you review the entire helpguide section for this to understand all of the references:



      edit: Removed references to NT8.
      Last edited by NinjaTrader_PaulH; 04-11-2018, 09:00 AM.

      Comment


        #4
        It is for NT7.
        What I need to do is make a variable and assign it the value of the Close of the 14 Range bar. Then based on that Close, compare whether it is <= or >= various levels on my chart to determine whether they are Support or Resistance levels.

        Comment


          #5
          Hello RJBen,

          Thanks for your reply.

          We've moved your thread into the NT7 section and I will remove the NT8 references and links in my previous post.

          Adding a data series to your script will cause it to be a multi time frame script and the helpguide link for the multi time frame that is in the prior post will detail what you need to do to access the close value of the added data series.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by charlesugo_1, 05-26-2026, 05:03 PM
          0 responses
          72 views
          0 likes
          Last Post charlesugo_1  
          Started by DannyP96, 05-18-2026, 02:38 PM
          1 response
          152 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 05-11-2026, 05:56 AM
          0 responses
          162 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, 05-10-2026, 08:12 PM
          0 responses
          100 views
          0 likes
          Last Post CarlTrading  
          Started by Hwop38, 05-04-2026, 07:02 PM
          0 responses
          288 views
          0 likes
          Last Post Hwop38
          by Hwop38
           
          Working...
          X