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 CarlTrading, 05-11-2026, 05:56 AM
            0 responses
            27 views
            0 likes
            Last Post CarlTrading  
            Started by CarlTrading, 05-10-2026, 08:12 PM
            0 responses
            20 views
            0 likes
            Last Post CarlTrading  
            Started by Hwop38, 05-04-2026, 07:02 PM
            0 responses
            183 views
            0 likes
            Last Post Hwop38
            by Hwop38
             
            Started by CaptainJack, 04-24-2026, 11:07 PM
            0 responses
            335 views
            0 likes
            Last Post CaptainJack  
            Started by Mindset, 04-21-2026, 06:46 AM
            0 responses
            260 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Working...
            X