Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Assigning values to a Dataseries variable

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

    Assigning values to a Dataseries variable

    Hi Ninjas,

    Basic doubt here. Among these two ways to assigning values to a dataserie variable are:

    1. Mydata.Set(int barsAgo, double value)
    2. Mydata[int barsAgo]= double value

    Both of them are correct and perform similarly ? I always look for efficient and more reliable ways to do things

    I've tried them out with different results but by little. I can't see number 2 in the NT help guide, is it wrong?



    Thanks
    Last edited by pstrusi; 04-17-2015, 12:08 PM.

    #2
    Hello,

    Thank you for the question.

    The .Set method would be the best option as this uses the internal error handling where the other way around does not.

    Both will work but .Set is the supported way in the help documentation.

    I look forward to being of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    152 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    87 views
    1 like
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    131 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    127 views
    1 like
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    106 views
    0 likes
    Last Post CarlTrading  
    Working...
    X