Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Partial Calculate On Bar Close

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

    Partial Calculate On Bar Close

    I've developed an indicator that has several plots. For the most part I want the indicator plots to update real-time (Claculate on Bar Close = False). But there are certain aspects of the plot that I want updated only on the close of the bar.

    Tradestation's EL does this by determining if the incoming tick is occuring WITHIN the bar or on the CLOSE of the bar. Is NinjaScript capable of determining such conditions? If so, how would I set this up as an if/then condition?

    Thank you in advance.

    Bob

    #2
    Bob,

    The closing of a bar is the same event as the opening of a new bar. You can check for this by doing if (FirstTickOfBar). When you are receiving the first tick of a bar, the previous tick was the last tick of the prior bar and that means accessing Open[1], Close[1], etc. would be for the just closed bar.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by TrendTracker View Post
      I've developed an indicator that has several plots. For the most part I want the indicator plots to update real-time (Claculate on Bar Close = False). But there are certain aspects of the plot that I want updated only on the close of the bar.

      Tradestation's EL does this by determining if the incoming tick is occuring WITHIN the bar or on the CLOSE of the bar. Is NinjaScript capable of determining such conditions? If so, how would I set this up as an if/then condition?

      Thank you in advance.

      Bob
      Bob,

      If you want some lines updated continously and other lines updated at bar close, place two instances of the same indicator in the same panel.

      Make one calculate on bar close to false, the other to true.

      Change color to invisible what you dont want to see on each instance.

      If you want to do this in a strategy, you need to build seperate unique versions of the indicator.

      If this configuration is what you are looking for, be sure to save it as a template so you don't have to rebuild it every time.

      Good Luck,

      RJay
      Last edited by RJay; 06-04-2009, 07:39 AM.
      RJay
      NinjaTrader Ecosystem Vendor - Innovative Trading Solutions

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      666 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      377 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      110 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      575 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      580 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X