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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      157 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      91 views
      1 like
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      143 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      131 views
      1 like
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      107 views
      0 likes
      Last Post CarlTrading  
      Working...
      X