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 UltraNIX, Today, 06:17 AM
    0 responses
    2 views
    0 likes
    Last Post UltraNIX  
    Started by knarfoe, Today, 04:01 AM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_ChrisSch  
    Started by jukilo2000, Today, 02:28 AM
    1 response
    3 views
    0 likes
    Last Post NinjaTrader_Marco  
    Started by iamkajal, Today, 01:27 AM
    0 responses
    4 views
    0 likes
    Last Post iamkajal  
    Started by timmbbo, Yesterday, 10:27 PM
    1 response
    11 views
    0 likes
    Last Post tgn55
    by tgn55
     
    Working...
    X