• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Time.GetValueAt

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

    Time.GetValueAt

    The documentation says that 'Time' is a Series<DateTime>.


    However, when I use this code: Time.GetValueAt(index) I get the compiler error:
    'NinaTrader.NinjaScript.TimeSeries' does not contain a definition for 'GetValueAt'.... CS1061


    I believe 'Time' should support the GetValueAt method.

    #2
    Hello ElectronicLocal,

    The .GetValueAt() method is available to Series<T> but not available to TimeSeries<DateTime>. These are different structure types TimeSeries<DateTime> does not inherit from Series<T>.

    As a work around, you may try Time[CurrentBar - (CurrentBar - barValue)]
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Againmain1, Today, 03:04 AM
    1 response
    20 views
    1 like
    Last Post NinjaTrader_ShawnB  
    Started by jmahon, Yesterday, 11:44 PM
    1 response
    12 views
    0 likes
    Last Post NinjaTrader_ChrisL  
    Started by Tomhgriff1, 01-03-2020, 04:07 AM
    4 responses
    47 views
    0 likes
    Last Post bkonia
    by bkonia
     
    Started by cary1267, Today, 09:37 AM
    1 response
    20 views
    0 likes
    Last Post NinjaTrader_ShawnB  
    Started by nfsolutions, Today, 06:41 AM
    1 response
    22 views
    0 likes
    Last Post NinjaTrader_ShawnB  
    Working...
    X