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

how can i find certain value in series without using bars ago coz they r unknown

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

    how can i find certain value in series without using bars ago coz they r unknown

    hi
    i made string and data series
    and put unique values in string series
    and un unique values in data series
    can i access the unique value in string series with its value only
    and then can i access the paralell values of data series close high time volume which r present at the position of the unique value of string series
    "like as in excel sheet when accessing certain value u can access all values in thatrow"
    thanks

    #2
    i found "list" in some codes here but no mention of it in help guide????

    Comment


      #3
      Hello ahmedallam,

      Thank you for writing in.

      If you wish to check what index a value is at, I would suggest utilizing a for loop.

      As an example:
      Code:
      int index = 0;
      
      for (int i = CurrentBar; i > -1; i--)
      {
           // replace myValue variable below with your value variable/value itself
           if (myDataSeries[i] == myValue;
           {
                index = i; // assign index variable to i
                break; // break out of for loop because it is no longer necessary to keep looking for the value
           }
      }
      With this index value, you can go and obtain the value at the same index for your other DataSeries.

      Example:
      Code:
      Print(myOtherDataSeries[index]);
      For more information about for loops, please take a look at this Dot Net Perls link: http://www.dotnetperls.com/for

      Please, let us know if we may be of further assistance.
      Zachary G.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Rapine Heihei, Yesterday, 07:51 PM
      1 response
      12 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by kaywai, Today, 06:26 AM
      1 response
      6 views
      0 likes
      Last Post kaywai
      by kaywai
       
      Started by ct, 05-07-2023, 12:31 PM
      6 responses
      205 views
      0 likes
      Last Post wisconsinpat  
      Started by kevinenergy, 02-17-2023, 12:42 PM
      118 responses
      2,780 views
      1 like
      Last Post kevinenergy  
      Started by briansaul, Today, 05:31 AM
      0 responses
      10 views
      0 likes
      Last Post briansaul  
      Working...
      X