Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Post when on CurrentBar

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

    Post when on CurrentBar

    I have this posted in my OnBarUpdate

    Code:
    foreach(double price in priceList)
    {
    DrawText("Tag", "Price was here", 0, price, Color.Black); 
    }
    But see, my problem is that whenever each bar is called, it reprints it over and over when the program goes through each single historical bar.

    How do I do something like IF ON REAL CURRENT BAR...

    something like if(CurrentBar = Actual current bar now)?

    Therefore it will not post over and over, but instead just post when the final bar is reached at the end of the chart on the current bar in real time.

    #2
    Maciek, you could for example look into not call it if you're in Historical - http://www.ninjatrader.com/support/h...sub=historical

    Adding a check like this would only call the condition then on real time bars.

    Comment

    Latest Posts

    Collapse

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