Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

LastClose

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

    LastClose

    How do I reference the "LastClose" value from MarketAnalyser in a Ninjascript ? I put the close value from priorDayOHLC side by side with the LastClsoe value and they are different, and I would like to access the LastClose value from my script.

    For example, right now on 10/26, looking at SPY the LastClose value is 108.08 (from 10/23) on but the priorDayOHLC close value is 108.15.

    #2
    PriorDayOHLC gets you the close as determined by the data presented on the chart. The close of the last bar on 10/23 is the value you will get. As you could imagine, session begin/end times heavily influences this. This could very well be different from the official settlement close price seen on daily bars.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Thanks Josh, what is the data method to access the 'LastClose' value then? I tried using Bars.GetSessionBar(1).Close and it gives me back the the same as priorDayOHLC.




      Originally posted by NinjaTrader_Josh View Post
      PriorDayOHLC gets you the close as determined by the data presented on the chart. The close of the last bar on 10/23 is the value you will get. As you could imagine, session begin/end times heavily influences this. This could very well be different from the official settlement close price seen on daily bars.

      Comment


        #4
        There is none. You cannot access that fundamental data. From NinjaScript you can only access information as related to the bar objects. LastClose is not related to bars per se.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          You could work with the PriorDayOHLC and adjust the chart session times to your needs, but as Josh pointed out data would not be expected to line up then with the LastClose used in the MA.
          BertrandNinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by jaybedreamin, Today, 05:56 PM
          0 responses
          7 views
          0 likes
          Last Post jaybedreamin  
          Started by DJ888, 04-16-2024, 06:09 PM
          6 responses
          18 views
          0 likes
          Last Post DJ888
          by DJ888
           
          Started by Jon17, Today, 04:33 PM
          0 responses
          4 views
          0 likes
          Last Post Jon17
          by Jon17
           
          Started by Javierw.ok, Today, 04:12 PM
          0 responses
          12 views
          0 likes
          Last Post Javierw.ok  
          Started by timmbbo, Today, 08:59 AM
          2 responses
          13 views
          0 likes
          Last Post bltdavid  
          Working...
          X