Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Exotic Bar Type in Strategy

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

    Exotic Bar Type in Strategy

    Hi,

    I've been using this method below to add series of an exotic bar type into my strategy

    Code:
    AddDataSeries(new BarsPeriod { BarsPeriodType = (BarsPeriodType)42069, Value=10});
    I tried to use the same method for the "heiken-ashi-accurate-barstype" that I downloaded from ninjatraderecosystem

    This is a corrected version of the Heiken Ashi BarsType that comes with NinjaTrader that aims to address the following issues: Values do not match rounded indicator (actual candle Open High and Low are not tracked and used in the BarsType) Realtime Close is incorrect (reloading historical data results in different results) The first bar […]


    This bar type has two settings, 1) Base Period Type 2) Base Period Value.

    I couldn't figure out how the code above should be set up to choose Base Period Type = Volume and Base Period Value=1000.

    Any idea anyone?

    thanks
    M

    #2
    Hello mntemel,

    You can specify the other properties for the series in the BarsPeriod you created:

    Code:
    AddDataSeries(new BarsPeriod { BarsPeriodType = (BarsPeriodType) 42069, BaseBarsPeriodType= BarsPeriodType.Volume, Value = 1000});


    Comment


      #3
      @NinjaTrader_Jesse

      You guys are amazing as always, had to make a little adjustment, this below code seems to be working now, many thanks

      Code:
      AddDataSeries(new BarsPeriod { BarsPeriodType = (BarsPeriodType)42069, BaseBarsPeriodType=BarsPeriodType.Volume, BaseBarsPeriodValue = 1000});

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Today, 05:17 AM
      0 responses
      20 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      119 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      63 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      41 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      45 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X