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 Davidtowleii, Today, 12:15 AM
      0 responses
      3 views
      0 likes
      Last Post Davidtowleii  
      Started by guillembm, Yesterday, 11:25 AM
      2 responses
      9 views
      0 likes
      Last Post guillembm  
      Started by junkone, 04-21-2024, 07:17 AM
      9 responses
      68 views
      0 likes
      Last Post jeronymite  
      Started by trilliantrader, 04-18-2024, 08:16 AM
      4 responses
      20 views
      0 likes
      Last Post trilliantrader  
      Started by mgco4you, Yesterday, 09:46 PM
      1 response
      11 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Working...
      X