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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        81 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        43 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        64 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        68 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        56 views
        0 likes
        Last Post CarlTrading  
        Working...
        X