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 Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    558 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    324 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    545 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    547 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X