Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Is there a data structure that holds Close,Open,Low, High of a bar?

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

    Is there a data structure that holds Close,Open,Low, High of a bar?

    Hi,

    Is there a single data structure that holds Close,Open,Low, High of a bar?
    I want to pass all this parameters to a function and wanted to know if there is a data structure in NT that include those parameters for the current bar.
    For example the Bars[0] return a double which is not what I need.

    Thanks in advance!

    #2
    I think I found a solution:
    Transfer to the function a reference of the indicator and then have access to the Close,Low etc.
    In the call for the function within the indicator use (this);
    Last edited by freewind; 02-27-2011, 06:55 AM.

    Comment


      #3
      Your method will have access to an Indicator/Strategy OHLCV and Time properties.

      For example:

      private void YourMethod()
      {
      double open = Open[0];
      double close = Close[0];
      }

      etc...
      RayNinjaTrader Customer Service

      Comment


        #4
        I'm referring to an external class(not inherit from Indicator) within the Indicator namespace.

        Comment


          #5
          Originally posted by freewind View Post
          I'm referring to an external class(not inherit from Indicator) within the Indicator namespace.
          I thought that that structure would be the Bar itself.

          Comment


            #6
            When you call your function/method, can't you just pass in the most recent bar's data?
            AustinNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            576 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            334 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            101 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            553 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            551 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X