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 tsantospinto, 04-12-2024, 07:04 PM
        7 responses
        126 views
        0 likes
        Last Post aligator  
        Started by futtrader, 04-21-2024, 01:50 AM
        5 responses
        56 views
        0 likes
        Last Post NinjaTrader_Eduardo  
        Started by PeakTry, Today, 10:49 AM
        0 responses
        2 views
        0 likes
        Last Post PeakTry
        by PeakTry
         
        Started by llanqui, Today, 10:32 AM
        0 responses
        5 views
        0 likes
        Last Post llanqui
        by llanqui
         
        Started by StockTrader88, 03-06-2021, 08:58 AM
        45 responses
        3,994 views
        3 likes
        Last Post johntraderuser2  
        Working...
        X