Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Bars.Period.Id

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

    Bars.Period.Id

    Hi,
    I'm trying to store the value of Bars.Period.Id in a variable.

    When I print it I get MInute, Tick, or whatever the current value is, but I can't store it.

    for example:

    Type = Bars.Period.Id (Type is a string varible) or
    Tppe = (string)Bars.Period.Id

    I get "Cannot convert type 'NInja Trader.Data.PeriodType" to 'string'

    ANy thoughts?

    #2
    Use the .ToString() method.
    Type = Bars.Period.Id.ToString()
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Thanks Josh.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by tradingnasdaqprueba, Today, 03:42 AM
      1 response
      17 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by DynamicTest, Yesterday, 11:18 PM
      1 response
      5 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by Rogers101, 05-05-2024, 11:30 AM
      6 responses
      26 views
      0 likes
      Last Post Rogers101  
      Started by llanqui, Yesterday, 03:51 PM
      4 responses
      22 views
      0 likes
      Last Post llanqui
      by llanqui
       
      Started by smartromain, Yesterday, 10:50 PM
      1 response
      13 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Working...
      X