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

custom bars type

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

    custom bars type

    Hi,

    I have the following custom bars type on my NT.
    BarsPeriod = new BarsPeriod { BarsPeriodType = (BarsPeriodType) 6564, BarsPeriodTypeName = @"RTHDay", Value = 1};

    How would this line of code look like if I want to check for that?
    ​BarsPeriod.BarsPeriodType == BarsPeriodType.Day

    Thanks
    Thomas

    #2
    Hi Thomas, it would be written as:

    if(​BarsPeriod.BarsPeriodType == (BarsPeriodType) 6564)
    {
    //the custom bar type is being used.
    }
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Many thanks Chris!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by knighty6508, Today, 01:20 AM
      0 responses
      5 views
      0 likes
      Last Post knighty6508  
      Started by knighty6508, Today, 01:17 AM
      0 responses
      6 views
      0 likes
      Last Post knighty6508  
      Started by tierraany, Today, 01:06 AM
      0 responses
      4 views
      0 likes
      Last Post tierraany  
      Started by Wilmarobyi, Today, 12:48 AM
      0 responses
      3 views
      0 likes
      Last Post Wilmarobyi  
      Started by BackToTheFutures, 08-17-2021, 03:15 PM
      8 responses
      732 views
      0 likes
      Last Post joehanus  
      Working...
      X