Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to assign array value to Series array

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

    How to assign array value to Series array

    Hi,
    I have created a series string array MyStockName.
    private Series<string[]>MyStockName;

    and created a string array symbol
    string [] symbol = new string[] { "V","AAPL","MA","IBM","MSFT"};

    In OnBarUpdate(),
    I would like to assign the string array symbol value to MyStockName[0] during every bar.
    How can I do?

    Is it the following code?
    MyStockName[0]= symbol;

    Thanks.


    Attached Files

    #2
    Hello heiheilau2000,

    Thanks for your post.

    You will need to create MyStockName = new Series<string[]>(this, MaximumBarsLookBack.Infinite); in state.DataLoaded as this is when you have the bars loaded.

    Reference: https://ninjatrader.com/support/help...tatechange.htm

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    63 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    139 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    75 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    45 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    50 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X