• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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 StevenNelson, Today, 03:05 PM
          0 responses
          1 view
          0 likes
          Last Post StevenNelson  
          Started by Benjaminf, Today, 02:21 PM
          1 response
          6 views
          0 likes
          Last Post NinjaTrader_Kate  
          Started by grayfrog, 05-24-2020, 09:29 PM
          5 responses
          31 views
          0 likes
          Last Post NinjaTrader_RyanS  
          Started by chrismcdermut, Today, 01:46 PM
          1 response
          8 views
          0 likes
          Last Post NinjaTrader_Kate  
          Started by dpolyakov, Today, 01:13 PM
          3 responses
          14 views
          0 likes
          Last Post dpolyakov  
          Working...
          X