Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Value[] series without plotting

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

    Value[] series without plotting

    I am unclear how AddPlot implements the Values[]. I'm looking more for general info than having a specific question. I am needing a couple arrays that would grow with Bars.length and be accessed programmatically in the same way High[] Low[] etc are accessed. I like the convenience of using the Values[] in my code, managing array size, etc but I do not want them to be plotted on my indicator. I would like to "add" (associate?) a value to each bar in the indicator and am wondering what the advantages or disadvantages there are to using the Values[] vs declaring my own array, if any.

    Is it possible to resize the Values[] from the indicator? I understand it's multidimensional and they can't be Array.Resize()'d? Is there a better implementation for me than to just declare my own single dimension array and resize it for every new element?

    #2
    Hello Chippy,

    Thank you for your post.

    You can use a Series<t> to hold a value for each bar on the chart. A Series<T> is a special generic type of data structure that can be constructed with any chosen data type and holds a series of values equal to the same number of elements as bars in a chart. If you have 200 bars loaded in your chart with a moving average plotted, the moving average itself holds a Series<double> object with 200 historical values of data, one for each bar.



    An example may be found in our help guide here:



    Please let us know if we may be of further assistance to you.

    Comment

    Latest Posts

    Collapse

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