Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

CalculateOnBarClose

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

    CalculateOnBarClose

    CalculateOnBarClose = false.
    Chart = 5 minute.
    NT7

    What does Close[1] and Close[0] refer to??

    Does Close[0] return the Close of the current tick or the Close of the current 5 minute bar??

    Does Close[1] return the Close of the prior 5 minute bar or the Close of the prior tick of the current 5 minute bar??

    Thanks

    #2
    Romulan,

    I am happy to assist you.

    Close[0] will be the most current quoted price, so ticks.

    Close[1] will be the closing price of the last 5 minute bar.

    This is only true if CalculateOnBarClose = false;

    Please let me know if I may assist further.
    Adam P.NinjaTrader Customer Service

    Comment


      #3
      Adam,

      I always think of quotes are Ask and Bid prices, but they can also be the most recent trade price. Isn't Close[0] actually the most recent traded price in the current bar or interval?

      That's why Close[0] is confusing, because for any historical bar or interval, there is only one Open, High, Low, Close, but while the current bar is forming, the latest trade price is the same as the Close[0] even though the Closing price has yet to be established.

      Comment


        #4
        borland,

        Close[0] with CalculateOnBarClose = false will be the "last" price. If you want bid/ask data you can use GetCurrentBid() and GetCurrentAsk().

        Please let me know if I may assist further.
        Adam P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        599 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        344 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        103 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        558 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        557 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X