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

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.
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by SantoshXX, Today, 03:09 AM
    0 responses
    11 views
    0 likes
    Last Post SantoshXX  
    Started by DanielTynera, Today, 01:14 AM
    0 responses
    2 views
    0 likes
    Last Post DanielTynera  
    Started by yertle, 04-18-2024, 08:38 AM
    9 responses
    41 views
    0 likes
    Last Post yertle
    by yertle
     
    Started by techgetgame, Yesterday, 11:42 PM
    0 responses
    12 views
    0 likes
    Last Post techgetgame  
    Started by sephichapdson, Yesterday, 11:36 PM
    0 responses
    2 views
    0 likes
    Last Post sephichapdson  
    Working...
    X