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 CortexZenUSA, Today, 12:53 AM
        0 responses
        1 view
        0 likes
        Last Post CortexZenUSA  
        Started by CortexZenUSA, Today, 12:46 AM
        0 responses
        0 views
        0 likes
        Last Post CortexZenUSA  
        Started by usazencortex, Today, 12:43 AM
        0 responses
        2 views
        0 likes
        Last Post usazencortex  
        Started by sidlercom80, 10-28-2023, 08:49 AM
        168 responses
        2,262 views
        0 likes
        Last Post sidlercom80  
        Started by Barry Milan, Yesterday, 10:35 PM
        3 responses
        10 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Working...
        X