Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Could IsFirstTickOfBar Miss?

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

    Could IsFirstTickOfBar Miss?


    Could IsFirstTickOfBar Miss?

    On my OnBarUpdate method, I have it set to Price Change. Say the price of the first tick of a new bar, is the same price as the price of the last tick of previous bar. It would seem that OnBarUpdate would not fire then, so any IsFirstTickOfBar logic would also not fire then.

    Would this be the case? Thanks,



    #2
    Hello timmbbo,

    Thanks for your post.

    I am not aware of any instances where IsFirstTickOfBar does not get triggered when the first tick of a new bar occurs while using Calculate.OnPriceChange or Calculate.OnEachTick.

    When using Calculate.OnPriceChange, IsFirstTickOfBar will always return true when the first tick of a new bar occurs.

    You could add prints to your script within an IsFirstTickOfBar condition that prints something like "IsFirstTickOfBar triggered" along with the time of the bar (Time[0]) to see how the logic is evaluating.

    See the help guide documentation below for more information.

    IsFirstTickOfBar: https://ninjatrader.com/support/help...ub=isfirsttick
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    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
    119 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