Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Realtime Secondary Timeframe

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

    Realtime Secondary Timeframe

    Hello! I'm trying to code the next thing.
    I have main series of 5 min timeframe and secondary series of 60 min.
    On my secondary timeframe I have an SMA, and I want to calculate it not only on secondary Timeframe will close, but calculate it in realtime. How can I do this?
    And one more thing - I want to calculate 5min series on bar close. How to separate this logic? Thank you.

    #2
    Hello YevhenShynkarenko,

    Thanks for your questions.

    The hosting script can be set to Calculate.OnPriceChange, and each data series will be updated in realtime with each price change.

    If you would like to have certain actions happen following OnBarClose functionality when using Calculate.OnEachTick or Calculate.PriceChange, you can check IsFirstTickOfBar, and reference the bar that had just closed. I.E. use BarsAgo 1, or Close[1].

    If you want to separate logic between different data series, BarsInProgress checks would be used.

    IsFirstTickOfBar - https://ninjatrader.com/support/help...ttickofbar.htm

    BarsInProgress checks - https://ninjatrader.com/support/help...arupdateMethod

    We look forward to assisting.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    649 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    370 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    109 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    574 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    576 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X