Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OHLC of Entry Bar

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

    OHLC of Entry Bar

    hi I need to get the OHLC of the bar (15min) when a position was opened.

    How is this done?

    #2
    Hello,

    Thank you for your forum post.

    Just wanted to let you know that we received your note and that someone will respond in the morning.

    Thank You for your patience.
    BrettNinjaTrader Product Management

    Comment


      #3
      Oil_Trader, you could just save the barnumber of your entrybar and reference the OHLC then as needed.

      Comment


        #4
        Oil_Trader, the below should compile well -

        Code:
         
        if (ToTime(Time[0]) > ToTime(9, 30, 0))
        {
        }

        Comment


          #5
          If I set the Session times to be 930am to 415pm...would this be the same equivalent as this code?

          if (ToTime(Time[0]) > ToTime(9, 30, 0))

          Comment


            #6
            More or less, yes for the 9:30 part.
            If you do it by session definitions though it means all of your indicators will not take into account information before 9:30. If you do it by code your other indicators which you may use for signals and such would still be calculating and take into account data before 9:30.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              You might also consider Close[BarsSinceEntry()] and similar.
              Ryan M.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Mindset, 04-21-2026, 06:46 AM
              0 responses
              105 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by M4ndoo, 04-20-2026, 05:21 PM
              0 responses
              146 views
              0 likes
              Last Post M4ndoo
              by M4ndoo
               
              Started by M4ndoo, 04-19-2026, 05:54 PM
              0 responses
              71 views
              0 likes
              Last Post M4ndoo
              by M4ndoo
               
              Started by cmoran13, 04-16-2026, 01:02 PM
              0 responses
              125 views
              0 likes
              Last Post cmoran13  
              Started by PaulMohn, 04-10-2026, 11:11 AM
              0 responses
              79 views
              0 likes
              Last Post PaulMohn  
              Working...
              X