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 charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        56 views
        0 likes
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        143 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        160 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        96 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        276 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Working...
        X