Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How do you access the end of the last Bar data when using Calculate.OnEachTick?

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

    How do you access the end of the last Bar data when using Calculate.OnEachTick?

    If I'm using Calculate.OnEachTick, Close[1] references the close of the last tick, right?

    If so, do I need to create a custom data series to track what would be the normal "OnBarClose" Closes?


    #2
    Hello torch2k,

    Thank you for your post.

    If you are using a 1 tick data series, Close[1] would be the close of the tick previous to the current tick.

    If you are using, say, a 1 minute data series, Close[1] would refer to the close of the previous 1 minute bar to the one currently forming if you are using Calculate.OnEachTick. Close[0] would be the current price of the forming bar, based on the tick it's calculating on.

    Please let us know if we may be of further assistance to you.

    Comment


      #3
      Originally posted by NinjaTrader_Kate View Post
      Hello torch2k,

      Thank you for your post.

      If you are using a 1 tick data series, Close[1] would be the close of the tick previous to the current tick.

      If you are using, say, a 1 minute data series, Close[1] would refer to the close of the previous 1 minute bar to the one currently forming if you are using Calculate.OnEachTick. Close[0] would be the current price of the forming bar, based on the tick it's calculating on.

      Please let us know if we may be of further assistance to you.

      Oh, thanks! Glad I asked because I had that totally backwards in my head.

      Comment

      Latest Posts

      Collapse

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