Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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});


    JesseNinjaTrader Customer Service

    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 set2win, 08-04-2021, 09:23 AM
      39 responses
      1,001 views
      0 likes
      Last Post WaleeTheRobot  
      Started by md4866, Today, 08:15 PM
      0 responses
      8 views
      0 likes
      Last Post md4866
      by md4866
       
      Started by mjbatts91, Yesterday, 04:48 PM
      2 responses
      23 views
      0 likes
      Last Post mjbatts91  
      Started by pibrew, Today, 06:10 PM
      1 response
      22 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by actualfacts.2021, 07-25-2021, 03:11 PM
      8 responses
      1,188 views
      0 likes
      Last Post linkcou
      by linkcou
       
      Working...
      X