Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Anyone able to make a Custom Bar Type?

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

    Anyone able to make a Custom Bar Type?

    I've been trying to convert over a custom bar type I use and so far haven't been able to get it to show up in the data series list for selection

    Upon restarting NT if I have a custom bar type compiled I get this error popup: http://puu.sh/hCyDH/b748867aa7.png

    Steps I took
    1. Open existing bar type such as renko
    2. save as with new name
    3. go through and change existing name fields to new strings
    4. at this point there are no compile errors but I can't seem to get it to show up as an option in the bar types. When I restart it will cause the error mentioned above which makes me think there is something else I need to renamed. Or there is a way to set the index somewhere that I'm missing.


    If anyone has an example cs file of something that isn't stock I'd appreciate it.

    #2
    I would suggest using the Bar Type wizard to generate all the required code (right click on the BarTypes folder and select new...) which would generate everything you need to get started.

    I believe I can reproduce as you may not have updated the BarsPeriod identifier

    If you have:
    Code:
    BarsPeriod = new BarsPeriod { BarsPeriodType = BarsPeriodType.Renko };
    replace with something like

    Code:
    BarsPeriod = new BarsPeriod { BarsPeriodType = (BarsPeriodType) 14, BarsPeriodTypeName = "MyCustomBarsType", Value = 1 };
    There are 14 registered bars period types (0-13), you'll need to cast an int as the BarsPeriodType enum to register your own, which is why I used 14.

    edit: skin and bones attached as requested
    Attached Files
    Last edited by NinjaTrader_Matthew; 05-05-2015, 01:01 PM.
    MatthewNinjaTrader Product Management

    Comment


      #3
      Awesome thanks. I thought it might have something to do with that line but didn't know what to change it to. Works great now

      Comment


        #4
        Cool, glad that worked. We're looking at handling that situation a little more gracefully in the next beta build.
        MatthewNinjaTrader Product Management

        Comment


          #5
          NTEIGHT-8159 scheduled for B2 removes the assertion message that you mentioned in the first place. It also adds some more logging for when a user creates a new BarsType but hasn't configured it properly, which could cause errors.
          MatthewNinjaTrader Product Management

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by alifarahani, Today, 09:40 AM
          6 responses
          33 views
          0 likes
          Last Post alifarahani  
          Started by Waxavi, Today, 02:10 AM
          1 response
          17 views
          0 likes
          Last Post NinjaTrader_LuisH  
          Started by Kaledus, Today, 01:29 PM
          5 responses
          14 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by Waxavi, Today, 02:00 AM
          1 response
          12 views
          0 likes
          Last Post NinjaTrader_LuisH  
          Started by gentlebenthebear, Today, 01:30 AM
          3 responses
          17 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Working...
          X