Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

restarting onbarupdate

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

    restarting onbarupdate

    Hi

    Is there a way to restart indicator when the last historical bar is reached. I want to do the first run for calculating one parameter, then the second run to calculate another parameter and only then apply the indicator. For now I have to save all intermediate parameters to the file and restart the indicator manually changing input parameters to reflect the order of run.

    Also is there a way to find out the CurrentBar number of the last historical bar before the next (live) tick arrives?

    Thank you.

    #2
    Hello BoyPlunger,

    It is not supported to programmatically restart an indicator. If you would only like to do some calculations historically you can do something like:

    Code:
    if (Historical)
    {
        //Do something
    }
    http://www.ninjatrader.com/support/h...historical.htm

    To find the Bar of the last historical you would have to calculate manually, or inside if (Historical) set the CurrentBar to a variable so you once if (Historical) is not running that variable will contain the last Bar of the Historical processing.

    Let us know if we can be of further assistance.
    JCNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    571 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    331 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
    549 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    549 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X