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