Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

CurrentDayOHL() COBC

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

    CurrentDayOHL() COBC

    CurrentDayOHL() indicator is set to Calculate On Bar Close = true as a default. If I use this in my code:

    double currentHigh = CurrentDayOHL().CurrentHigh[0];

    This only updates the value once per bar. Is there a way I can pass a parameter to CurrentDayOHL() to make it COBC = false? If not, will I have to create a custom version of the routine then?

    Thanks!
    Bryan

    #2
    Hello Bryan,

    Thank you for your post.

    Is your indicator set to COBC = True?

    If you indicator is set to COBC = false then the CurrentDayOHL will update on each tick.

    Please let me know if you have any questions.

    Comment


      #3
      Originally posted by NinjaTrader_PatrickH View Post
      Hello Bryan,

      Thank you for your post.

      Is your indicator set to COBC = True?

      If you indicator is set to COBC = false then the CurrentDayOHL will update on each tick.

      Please let me know if you have any questions.

      D'oh. You are right. I didn't know if the CurrentDayOHL would inherit that setting, but yes it does! Thanks, Patrick! :-)

      Comment


        #4
        One thing I noted with this indicator though, the CurrentDayOHL().CurrentOpen[0] is giving me the open of the current bar, rather than Open[Bars.BarsSinceSession]. Maybe I'm misunderstanding, or not using it right?

        Comment


          #5
          Hello Bryan,

          Thank you for your response.

          What instrument and interval are you testing this on?

          I look forward to your response.

          Comment


            #6
            Originally posted by NinjaTrader_PatrickH View Post
            Hello Bryan,

            Thank you for your response.

            What instrument and interval are you testing this on?

            I look forward to your response.
            This is on the $AUDJPY instrument on a 60 minute chart. I'm using FXCM as the broker.

            Comment


              #7
              Hello Bryan,

              Thank you for your response.

              I am unable to recreate this item on my end.

              Do you have a toy sample of your code that I may test on my end?

              I look forward to your response.

              Comment

              Latest Posts

              Collapse

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