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 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
              43 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
              56 views
              0 likes
              Last Post CarlTrading  
              Working...
              X