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 sjsj2732, Yesterday, 04:31 AM
    0 responses
    31 views
    0 likes
    Last Post sjsj2732  
    Started by NullPointStrategies, 03-13-2026, 05:17 AM
    0 responses
    286 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    283 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    133 views
    1 like
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    91 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Working...
    X