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 rbeckmann05, Yesterday, 06:48 PM
          1 response
          12 views
          0 likes
          Last Post bltdavid  
          Started by llanqui, Today, 03:53 AM
          0 responses
          6 views
          0 likes
          Last Post llanqui
          by llanqui
           
          Started by burtoninlondon, Today, 12:38 AM
          0 responses
          10 views
          0 likes
          Last Post burtoninlondon  
          Started by AaronKoRn, Yesterday, 09:49 PM
          0 responses
          15 views
          0 likes
          Last Post AaronKoRn  
          Started by carnitron, Yesterday, 08:42 PM
          0 responses
          11 views
          0 likes
          Last Post carnitron  
          Working...
          X