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

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 arvidvanstaey, Today, 02:19 PM
      4 responses
      11 views
      0 likes
      Last Post arvidvanstaey  
      Started by samish18, 04-17-2024, 08:57 AM
      16 responses
      59 views
      0 likes
      Last Post samish18  
      Started by jordanq2, Today, 03:10 PM
      2 responses
      9 views
      0 likes
      Last Post jordanq2  
      Started by traderqz, Today, 12:06 AM
      10 responses
      18 views
      0 likes
      Last Post traderqz  
      Started by algospoke, 04-17-2024, 06:40 PM
      5 responses
      47 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X