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 GussJ, 03-04-2020, 03:11 PM
        11 responses
        3,228 views
        0 likes
        Last Post xiinteractive  
        Started by andrewtrades, Today, 04:57 PM
        1 response
        13 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by chbruno, Today, 04:10 PM
        0 responses
        7 views
        0 likes
        Last Post chbruno
        by chbruno
         
        Started by josh18955, 03-25-2023, 11:16 AM
        6 responses
        440 views
        0 likes
        Last Post Delerium  
        Started by FAQtrader, Today, 03:35 PM
        0 responses
        12 views
        0 likes
        Last Post FAQtrader  
        Working...
        X