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

Limiting Historical Data

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

    Limiting Historical Data

    When i use Print(Close[1]); i get lots of ticks up to very last last tick of previous bar!
    How do I limit historical data maybe to 5-10 bars ago so i don't get all those unnecessary data?
    Thank you.

    #2
    rigthclick on the chart -> DataSeries --> Load data based on : change it to "Bars" --> Bars to load: insert your preferred value here.

    Comment


      #3
      This will work for the chart but will it be the same for strategy?

      Comment


        #4
        i dont really get what the problem is. why do u even want to print the close of a bar and what bar? And for what purpose.

        if u use something like Print(Close[1]) ninjatrader will automaticly go through all your loaded data and perform this Print (if possible) for every single bar. thats why u get so many entries. you basicly get 1 for every bar. the only way to prevent that is to load less data but why? i dont even understand what you are tryin to achieve. whats the purpose of all of this.

        if you apply a strategy to a chart (by rightclicking and strategy) u can do the same thing as i said in my previous post. if you use the strategy analyzer then the only way to limit the amount of prints that way would to only run the strategy for 5 bars but again, i dont get what your goal is.

        maybe you should explain what ur tryin to do a bit better.

        Comment


          #5
          Got it! Thanks.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by bortz, 11-06-2023, 08:04 AM
          47 responses
          1,606 views
          0 likes
          Last Post aligator  
          Started by jaybedreamin, Today, 05:56 PM
          0 responses
          8 views
          0 likes
          Last Post jaybedreamin  
          Started by DJ888, 04-16-2024, 06:09 PM
          6 responses
          18 views
          0 likes
          Last Post DJ888
          by DJ888
           
          Started by Jon17, Today, 04:33 PM
          0 responses
          4 views
          0 likes
          Last Post Jon17
          by Jon17
           
          Started by Javierw.ok, Today, 04:12 PM
          0 responses
          13 views
          0 likes
          Last Post Javierw.ok  
          Working...
          X