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 funk10101, Today, 12:02 AM
          1 response
          10 views
          0 likes
          Last Post NinjaTrader_LuisH  
          Started by GLFX005, Today, 03:23 AM
          1 response
          6 views
          0 likes
          Last Post NinjaTrader_Erick  
          Started by nandhumca, Yesterday, 03:41 PM
          1 response
          13 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by The_Sec, Yesterday, 03:37 PM
          1 response
          11 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by vecnopus, Today, 06:15 AM
          0 responses
          1 view
          0 likes
          Last Post vecnopus  
          Working...
          X