Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

PriorDayOHLC() obtaining n days back

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

    PriorDayOHLC() obtaining n days back

    Hi, confused about this function [nt7]

    Can I use it to obtain say 2 or 3 days back H/L/O/C? e.g.

    PriorDayOHLC().PriorOpen[int barsAgo] setting barsAgo to 1 or 2?

    Note that I am in 5 minute chart. Going further than yesterday do I have to load daily data or can I use the above?

    Also.. what is the function of barsAgo?

    #2
    Hello,
    PriorDayOHLC().PriorOpen[Int barsAgo] will get the value of the open price of the number of bars ago you enter for that interger.
    For example/ PriorDayOHLC().PriorOpen[5] will get the Prior Open price of the bar that is 5 bars before the current bar. If you are wanting to do multiple days back you will need to enter in that many bars.
    barsAgo functions as a value that you will enter in to calculate that many bars before the current bar.
    Cody B.NinjaTrader Customer Service

    Comment


      #3
      Thanks a lot, Cody.

      So I guess I totally misunderstood this function I thought it provided the OHLC of yesterday overall.

      So if I need to get OHLC of all of yesterday (overall, not of any particular bar) I would need to load daily data series in addition to my intraday data series?

      A related question:

      Returns current session open value
      CurrentDayOHL().CurrentOpen[int barsAgo]
      CurrentDayOHL(IDataSeries input).CurrentOpen[int barsAgo]

      In above, then [int barsAgo] should not matter, since open of session is the same number always.

      and...

      Returns current session high value
      CurrentDayOHL().CurrentHigh[int barsAgo]
      CurrentDayOHL(IDataSeries input).CurrentHigh[int barsAgo]

      does [int barsAgo] mean high before barsAgo, not the highest high of current session?

      Thanks!
      Last edited by stevenev; 03-06-2016, 02:14 PM.

      Comment

      Latest Posts

      Collapse

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