Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

On Bar Complete Event?

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

    On Bar Complete Event?

    Is there an Event that fires when a bar is completed? OR some other method I can call?
    I have an indicator that I want to paint on every tick "CalculateOnBarClose=False". But I'd like it to play a sound & raise an Alert if is closes satisying some criteria.

    At present as the bar forms it is firing a lot of Alerts/sounds. I just on the one when barComplete.
    (I know I could countdown the ticks & use a boolean as a flag but hoping for a more elegant solution)
    Thanks

    #2
    The closing of a bar is the same event as the open of the next bar. You can use:

    if (FirstTickOfBar)

    If you want to access the bar that just closed, you need to use [1] instead of [0] on the FirstTickOfBar event.
    Josh P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    154 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    306 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    244 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    345 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    176 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Working...
    X