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 NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    58 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    133 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    73 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    45 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    50 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X