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 CarlTrading, 03-31-2026, 09:41 PM
          1 response
          81 views
          1 like
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 04-01-2026, 02:41 AM
          0 responses
          42 views
          0 likes
          Last Post CarlTrading  
          Started by CaptainJack, 03-31-2026, 11:44 PM
          0 responses
          64 views
          2 likes
          Last Post CaptainJack  
          Started by CarlTrading, 03-30-2026, 11:51 AM
          0 responses
          68 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, 03-30-2026, 11:48 AM
          0 responses
          55 views
          0 likes
          Last Post CarlTrading  
          Working...
          X