Announcement

Collapse
No announcement yet.

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.

    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 Mindset, 04-21-2026, 06:46 AM
        0 responses
        88 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        134 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        68 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        118 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        67 views
        0 likes
        Last Post PaulMohn  
        Working...
        X