Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How can I update values in DataBox using OnRender?

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

    How can I update values in DataBox using OnRender?

    1. I added new plots in OnStateChange for State.SetDefaults case:

    AddPlot(new Stroke(Brushes.Green, 1), PlotStyle.Line, "LongLevel");
    AddPlot(new Stroke(Brushes.Red, 1), PlotStyle.Line, "ShortLevel");

    2. I added theese plots at the end of my code to see they in DataBox window:

    [Browsable(false)]
    [XmlIgnore]
    public Series<double> LongLevel
    {
    get { return Values[0]; }
    }


    [Browsable(false)]
    [XmlIgnore]
    public Series<double> ShortLevel
    {
    get { return Values[1]; }
    }

    3. I set the value like this (in OnBarUpdate):
    Values[0][0] = x;
    Values[1][0] = y;

    But when I open the window DataBox - I see inly n\a values. What do I wrong?

    PS
    I use OnRender in my indicator to render graphic elements.

    #2
    Hello handlar,

    I wanted to check are you seeing n/a for all bars on the chart or is this related to the current bar / random bars when you move the mouse around? Generally, N/A is reported for bars which do not have a value set.

    You may try making a more simple test and exclude any extra logic you have and just set the plots from OnBarUpdate for every bar. You could just use the close price and open price as a test, if you are able to now see the values instead of N/A that would indicate something with the logic used being at fault.

    If you can upload a simple indicator that demonstrates the problem as a test, we could work together on that as well.

    I look forward to being of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    603 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    349 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    104 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    560 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    560 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X