Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Get Open Close of Bar CurrentDayOHL().CurrentHigh[0];

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

    Get Open Close of Bar CurrentDayOHL().CurrentHigh[0];

    double valueHighA = CurrentDayOHL().CurrentHigh[0];
    double valueLowA = CurrentDayOHL().CurrentLow[0];

    How is it possible to get the opening and closing of a bar of daily highs?

    #2
    Hello memonolog,

    The Close of the bar could be represented by Close[0] or the last price. The day bar has not closed yet if you are using this intrabar so whatever the current Close is could be considered the Close or Last price for the bar.

    The open is included in the indicator:

    double valueHighA = CurrentDayOHL().CurrentHigh[0];
    double valueLowA = CurrentDayOHL().CurrentLow[0];
    double valueOpenA = CurrentDayOHL().CurrentOpen[0];
    double valueCloseA= Close[0];

    I look forward to being of further assistance.

    Comment


      #3
      Originally posted by NinjaTrader_Jesse View Post
      Hello memonolog,

      The Close of the bar could be represented by Close[0] or the last price. The day bar has not closed yet if you are using this intrabar so whatever the current Close is could be considered the Close or Last price for the bar.

      The open is included in the indicator:

      double valueHighA = CurrentDayOHL().CurrentHigh[0];
      double valueLowA = CurrentDayOHL().CurrentLow[0];
      double valueOpenA = CurrentDayOHL().CurrentOpen[0];
      double valueCloseA= Close[0];

      I look forward to being of further assistance.
      I don't need a daytime Open and Close
      I need open and Close of Specific bar, a bar that made the high or low of the day

      for instance

      double valueHighA = CurrentDayOHL (). CurrentHigh [0]; == This is High of Bar day maximum

      how can I get the Open and close of the bar at which the daily extremum was (Bar day maximum)?

      Comment


        #4
        I use not day bars, but 5 minutes bars

        Comment


          #5
          hello,

          The CurrentDayOHL is for the session, and the last 5 minute close would be the most updated price at that time. was there a different price for the close you wanted like the latest tick?

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          571 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          330 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
          548 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          549 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X