Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Custom Bar Types enum or list

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

    Custom Bar Types enum or list

    Hi,
    the BarsPeriodType enum does not expand beyond the built-in bars types, even when multiple custom bars types are installed.
    This information must be known somewhere convenient though, since any chart can pop-up a list of them in the DataSeries configuration window.
    Where can I find this list from code?
    Thanks,
    saltminer

    #2
    Hello,

    Thank you for the post.

    I am unsure of an existing collection of these items, the platform does have some internal logic to detect all BarTypes to display the list as you have noted. I will put in a question to development to see if there is a "total" list that is available to NinjaScript.

    In general referencing the custom types would need to be done by casting the int. BarsPeriodType = (BarsPeriodType) 15.

    When I have further information on this I will reply back.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Originally posted by saltminer View Post
      Hi,
      the BarsPeriodType enum does not expand beyond the built-in bars types, even when multiple custom bars types are installed.
      This information must be known somewhere convenient though, since any chart can pop-up a list of them in the DataSeries configuration window.
      Where can I find this list from code?
      Thanks,
      saltminer
      This works.

      private PeriodType barSelector = PeriodType.Custom4; (RenkoSpectrum 2.0)

      Custom bar types are identified by their "ID", not by their names inside Ninjatrader..

      If you want to see the chart names in an enum, you have to build your own custom listing.

      RJay
      RJay
      NinjaTrader Ecosystem Vendor - Innovative Trading Solutions

      Comment


        #4
        Thanks for contributing RJay - this is for NT8 though, which I admit I did not specify in my first post. So we are talking about BarsPeriodType in NT8.

        Actually, one of the types a client wishes to be able to select is RJayRenkoSpectrumClassic
        You'd be the best guy to ask about which ID that has in NT8!
        I'm trying to create an enum which contains custom bar types.

        thanks,
        saltminer

        Comment


          #5
          Ok, figured it out. Use BarsPeriod as the input, rather than BarsPeriodType.
          saltminer

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Mestor, 03-10-2023, 01:50 AM
          16 responses
          387 views
          0 likes
          Last Post z.franck  
          Started by rtwave, 04-12-2024, 09:30 AM
          4 responses
          31 views
          0 likes
          Last Post rtwave
          by rtwave
           
          Started by yertle, Yesterday, 08:38 AM
          7 responses
          29 views
          0 likes
          Last Post yertle
          by yertle
           
          Started by bmartz, 03-12-2024, 06:12 AM
          2 responses
          22 views
          0 likes
          Last Post bmartz
          by bmartz
           
          Started by funk10101, Today, 12:02 AM
          0 responses
          7 views
          0 likes
          Last Post funk10101  
          Working...
          X