Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Custom Text not Updating

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

    Custom Text not Updating

    Hello community,

    I am using the code
    Code:
    Draw.TextFixed(this, "tag", int, TextPosition.TopLeft);
    in order to display one of my calculations, however when I run it over live data it doesn't update with the creation of new bars.

    It updated in sync with whatever I had Calculate set to (in this case Calculate.OnPriceChange) on my last installation of NT, just like I wanted it to, but now it displays some initial value then doesn't update at all.

    I tried it with an without added granularity (in the form of an added tick series)

    It's placed in OnBarUpdate

    The calculation is not the problem, it is correct

    Any ideas as to what is going on?

    Same principle as if I were trying to display the system time on the actual rendered chart and it wasn't updating at all. Thanks!

    #2
    Hello, thanks for your post.

    This test works fine for me running the indicator OnBarClose (prints the current bar):

    Code:
    protected override void OnBarUpdate()
    {
        Draw.TextFixed(this, "mytext", CurrentBar.ToString(), TextPosition.BottomRight);
    }
    Could you share further details of your code?

    I look forward to hearing from you.
    Chris L.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by GussJ, 03-04-2020, 03:11 PM
    11 responses
    3,229 views
    0 likes
    Last Post xiinteractive  
    Started by andrewtrades, Today, 04:57 PM
    1 response
    14 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by chbruno, Today, 04:10 PM
    0 responses
    7 views
    0 likes
    Last Post chbruno
    by chbruno
     
    Started by josh18955, 03-25-2023, 11:16 AM
    6 responses
    441 views
    0 likes
    Last Post Delerium  
    Started by FAQtrader, Today, 03:35 PM
    0 responses
    12 views
    0 likes
    Last Post FAQtrader  
    Working...
    X