Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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
    cassb
    NinjaTrader Ecosystem Vendor - Logical Forex

    #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! :-)
      cassb
      NinjaTrader Ecosystem Vendor - Logical Forex

      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?
        cassb
        NinjaTrader Ecosystem Vendor - Logical Forex

        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.
            cassb
            NinjaTrader Ecosystem Vendor - Logical Forex

            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 Belfortbucks, Today, 09:29 PM
              0 responses
              6 views
              0 likes
              Last Post Belfortbucks  
              Started by zstheorist, Today, 07:52 PM
              0 responses
              7 views
              0 likes
              Last Post zstheorist  
              Started by pmachiraju, 11-01-2023, 04:46 AM
              8 responses
              151 views
              0 likes
              Last Post rehmans
              by rehmans
               
              Started by mattbsea, Today, 05:44 PM
              0 responses
              6 views
              0 likes
              Last Post mattbsea  
              Started by RideMe, 04-07-2024, 04:54 PM
              6 responses
              33 views
              0 likes
              Last Post RideMe
              by RideMe
               
              Working...
              X