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

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
    Brandon H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by AaronKoRn, Today, 09:49 PM
    0 responses
    11 views
    0 likes
    Last Post AaronKoRn  
    Started by carnitron, Today, 08:42 PM
    0 responses
    10 views
    0 likes
    Last Post carnitron  
    Started by strategist007, Today, 07:51 PM
    0 responses
    11 views
    0 likes
    Last Post strategist007  
    Started by StockTrader88, 03-06-2021, 08:58 AM
    44 responses
    3,980 views
    3 likes
    Last Post jhudas88  
    Started by rbeckmann05, Today, 06:48 PM
    0 responses
    9 views
    0 likes
    Last Post rbeckmann05  
    Working...
    X