Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

double to int?

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

    double to int?

    DataSeries objects can only contain double values.

    How do i use a dataseries object like an integer?

    I want to do this: Close[ mydataseries[1] ]

    but I'm not allowed even though mydataseries[1] = 14

    #2
    Stockgoblin, the only usage for Close is Close[bars ago].

    Checkout the language reference in Help.
    If the syntax/usage was stated as Close[idataseries] then it would work but that is not the case.

    Reading between the lines, it appears you are trying to get [barsAgo] to be a number in your data series. There might be a way but I'm not that savvy.

    Good luck

    Comment


      #3
      Originally posted by stockgoblin View Post
      DataSeries objects can only contain double values.

      How do i use a dataseries object like an integer?

      I want to do this: Close[ mydataseries[1] ]

      but I'm not allowed even though mydataseries[1] = 14
      Hi StockGoblin,

      Try something like this.

      Close[(int) mydataseries[1] ]

      RJay
      RJay
      NinjaTrader Ecosystem Vendor - Innovative Trading Solutions

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      582 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      338 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      103 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      554 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      552 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X