Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Timer Event Script

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

    Timer Event Script

    Hi,

    Is there any event in the script like OnBarUpdate that instead of being triggered every incoming tick is triggered every second ?

    Thenks

    #2
    Hello Agenor,

    Thank you for your note.

    There is no built in timer for this function.

    You would need to create and use your own method that would be using the System.Windows.Timer class

    Let me know if I can be of further assistance.
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Ok,

      So, is there a way to capture BarTimer indicator, that is native to NinjaTrader, inside the script ?

      If so, how to do it ?

      Thanks

      Comment


        #4
        Agenor,

        You don't want to capture the BarTimer indicator.

        Rather, you would want to use either a timer event or you can add an underlying data series for 1 second that will call OnBarUpdate()

        Note that the reason I didn't suggest this first as this all dependent upon Tick data calling OBU. If there are no ticks, then OBU does not get called.

        I have attached a sample script that will show how to add a data series and filter out the Bar Update for your calculations.
        Attached Files
        Cal H.NinjaTrader Customer Service

        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
        573 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