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 SalmaTrader, 07-07-2026, 10:26 PM
    0 responses
    54 views
    0 likes
    Last Post SalmaTrader  
    Started by CarlTrading, 07-05-2026, 01:16 PM
    0 responses
    25 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 06-17-2026, 10:32 AM
    0 responses
    17 views
    0 likes
    Last Post CaptainJack  
    Started by kinfxhk, 06-17-2026, 04:15 AM
    0 responses
    23 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 06-17-2026, 04:06 AM
    0 responses
    24 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Working...
    X