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

How I can figure out Chart start a new bar

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

    How I can figure out Chart start a new bar

    I setup NinjaScript.Calculation property to onEachTick or onPriceChange.
    so inside the method OnBarUpdate() how I could know when a new bar started?
    Thanks.
    Vlad

    #2
    Hello,

    You could know when the First tick of a new bar occurs using IsFirstTickOfBar. This denotes a new bar has started/the prior bar has closed.



    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      another question

      Hi Jesse,
      Sorry, somehow i miss this property in help guides. i just started study ninja8 a month ago.

      So as i understand if "IsFirstTickOfBar"==true we got the first tick of the bar.
      Is any possibility to miss this first tick i mean in case my computer was busy at this moment doing something like putting an order or processing another chart?

      does the ninja8 create a fifo stack of chart ticks being waiting to process and i never miss
      the first tick?

      Thanks,\
      Vlad

      Comment


        #4
        Hello Vlad,

        Yes, if the processor is busy any incoming ticks will be queued and will still be processed.

        If you are disconnected, these ticks would not be received and would not be queued.
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by rocketman7, Today, 09:41 AM
        0 responses
        0 views
        0 likes
        Last Post rocketman7  
        Started by rocketman7, Today, 02:12 AM
        7 responses
        31 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by guillembm, Yesterday, 11:25 AM
        3 responses
        16 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by junkone, 04-21-2024, 07:17 AM
        10 responses
        149 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by tsantospinto, 04-12-2024, 07:04 PM
        6 responses
        101 views
        0 likes
        Last Post tsantospinto  
        Working...
        X