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 SalmaTrader, 07-07-2026, 10:26 PM
          0 responses
          35 views
          0 likes
          Last Post SalmaTrader  
          Started by CarlTrading, 07-05-2026, 01:16 PM
          0 responses
          20 views
          0 likes
          Last Post CarlTrading  
          Started by CaptainJack, 06-17-2026, 10:32 AM
          0 responses
          13 views
          0 likes
          Last Post CaptainJack  
          Started by kinfxhk, 06-17-2026, 04:15 AM
          0 responses
          19 views
          0 likes
          Last Post kinfxhk
          by kinfxhk
           
          Started by kinfxhk, 06-17-2026, 04:06 AM
          0 responses
          21 views
          0 likes
          Last Post kinfxhk
          by kinfxhk
           
          Working...
          X