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 futtrader, 04-21-2024, 01:50 AM
    4 responses
    41 views
    0 likes
    Last Post futtrader  
    Started by Option Whisperer, Today, 09:55 AM
    1 response
    11 views
    0 likes
    Last Post bltdavid  
    Started by port119, Today, 02:43 PM
    0 responses
    7 views
    0 likes
    Last Post port119
    by port119
     
    Started by Philippe56140, Today, 02:35 PM
    0 responses
    7 views
    0 likes
    Last Post Philippe56140  
    Started by 00nevest, Today, 02:27 PM
    0 responses
    7 views
    0 likes
    Last Post 00nevest  
    Working...
    X