Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Creating Custom Bar Type

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

    Creating Custom Bar Type

    Any idea how to create the attached custom data series inside an indicator? The output from BarsTypeIndicator gives 103 for this bar type.

    Appreciate any help
    Attached Files

    #2
    Hello ark321,

    It would be necessary to know what was coded in the script.

    The bar type is likely using SetPropertyName to reused one of the available properties.


    From the help guide:
    "2. You can add a custom BarsType which is installed on your system by casting the registered enum value for that BarsPeriodType. For example: AddDataSeries((BarsPeriodType)103, 10);

    3. You can specify optional BarsPeriod values (such as Value2) of a custom BarsType in the BarsPeriod object initializer. For example: AddDataSeries(new BarsPeriod() { BarsPeriodType = (BarsPeriodType)103, Value = 10, Value2 = 20 });"
    https://ninjatrader.com/support/help...dataseries.htm

    Below is a link to helpful script that lists the IDs for each bar type.
    https://ninjatraderecosystem.com/use...pe-identifier/

    For example the UniRenko bar type re-uses BaseBarsPeriodValue, Value, and Value2 and would be called with AddDataSeries() as:
    AddDataSeries(new BarsPeriod(){BarsPeriodType = (BarsPeriodType) 2018, Value = 2, Value2 = 6, BaseBarsPeriodValue = 2});
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thanks for the pointers. How can I find out which property type is used in the Bar Type?

      Comment


        #4
        Hello ark321,

        You would need to open the script for editing in the NinjaScript Editor.

        If the script is a closed source assembly from a 3rd party, you would need to contact the vendor or author that distributed the software to you for assistance using their software.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          understood. Thank you

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          576 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          334 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          101 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          553 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          551 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X