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 AaronKoRn, Today, 09:49 PM
    0 responses
    7 views
    0 likes
    Last Post AaronKoRn  
    Started by carnitron, Today, 08:42 PM
    0 responses
    9 views
    0 likes
    Last Post carnitron  
    Started by strategist007, Today, 07:51 PM
    0 responses
    10 views
    0 likes
    Last Post strategist007  
    Started by StockTrader88, 03-06-2021, 08:58 AM
    44 responses
    3,980 views
    3 likes
    Last Post jhudas88  
    Started by rbeckmann05, Today, 06:48 PM
    0 responses
    9 views
    0 likes
    Last Post rbeckmann05  
    Working...
    X