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

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 elirion, Today, 09:32 PM
        0 responses
        2 views
        0 likes
        Last Post elirion
        by elirion
         
        Started by cre8able, Today, 09:15 PM
        1 response
        5 views
        0 likes
        Last Post bltdavid  
        Started by cummish, Today, 08:43 PM
        0 responses
        10 views
        0 likes
        Last Post cummish
        by cummish
         
        Started by Option Whisperer, Today, 07:58 PM
        4 responses
        21 views
        0 likes
        Last Post Option Whisperer  
        Started by ETFVoyageur, 05-07-2024, 07:05 PM
        13 responses
        87 views
        0 likes
        Last Post ETFVoyageur  
        Working...
        X