Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to evaluate one logic in each tick of 1 minute bar.

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

    How to evaluate one logic in each tick of 1 minute bar.

    Hello,

    I would like to know how to evaluate a specific logic in the ticks that make up each 1-minute bar. I want that logic to be evaluated from the start tick of the current 1-minute bar, through the rest and up to the last one of the same bar included.
    Has anyone had the same doubt and managed to find the code in NinjaScript?

    Thanks in advance for the help.​

    #2
    Hello BIOK.NT,

    To do that you would need to run the script in realtime using Calculate OnEachTick, that will make the OnBarUpdate override happen for each tick that is processed. To know when a new bar is generated you can use the FirstTickOfBar property.

    Join the official NinjaScript Developer Community for comprehensive resources, documentation, and community support. Build custom indicators and automated strategies for the NinjaTrader platforms with our extensive guides and APIs.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    43 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    20 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    30 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    49 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    38 views
    0 likes
    Last Post CarlTrading  
    Working...
    X