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 NullPointStrategies, Yesterday, 05:17 AM
        0 responses
        64 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        139 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        75 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        45 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        50 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X