Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bars to load

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

    Bars to load

    Hi support!

    How can i keep the exact number of bars in the Data Series?When i try to implement the exact number of bars,it doesnt happen and as the price moves on i have the additional bars i do not want.What can be done about it?

    Thx

    #2
    Hello SnakeEYE,

    For something like that I believe you would have to create a custom bar type to be able to control the bar count like that. Creating custom bar types is unfortunately not supported by NinjaTrader. However, you can review source code for existing bar types and could create your own as well. You will need something like Visual studio or a text editor to open this file here:
    Documents\NinjaTrader 7\bin\custom\type\@BarTypes.cs

    You could also take a look at the source code for indicator HeikenAshi, which is a kind of bar type but developed as indicator. Can view this using Tools > Edit NinjaScript > Indicator > Select HeikenAshi and open.

    Otherwise, if you are worried about performance you can always set the Maximum number of bars that your NinjaScript code can look at using the MaximumBarsLookBack.
    JCNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    144 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    71 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    125 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    79 views
    0 likes
    Last Post PaulMohn  
    Working...
    X