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 PaulMohn, Today, 03:49 AM
          0 responses
          4 views
          0 likes
          Last Post PaulMohn  
          Started by inanazsocial, Today, 01:15 AM
          1 response
          7 views
          0 likes
          Last Post NinjaTrader_Jason  
          Started by rocketman7, Today, 02:12 AM
          0 responses
          10 views
          0 likes
          Last Post rocketman7  
          Started by dustydbayer, Today, 01:59 AM
          0 responses
          2 views
          0 likes
          Last Post dustydbayer  
          Started by trilliantrader, 04-18-2024, 08:16 AM
          5 responses
          23 views
          0 likes
          Last Post trilliantrader  
          Working...
          X