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

Rewind to specific Bar

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

    Rewind to specific Bar

    Hello,

    I wonder if this is possible. Let's say I loaded a daily chart, and processed first 3 months (roughly 90 bars as each bar is a day). Right now my current bar is April 1. Is there any way to rewind the chart back, so that current bar becomes March 1?

    Thanks,
    redduke

    #2
    Hello RedDuke,

    Thanks for your post.

    The only way would be to reload your Ninjascript.

    If you can clarify what you want to accomplish, perhaps I can suggest an alternative.

    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Hi Paul,

      Thanks for you reply, can reload be done programmatically? Here is what I am trying to do. Let's say I enter Long on March 1, and a trade gets closed at some point in March, now I want to see what would have happened if I entered Short on March 1. Essentially I want to go back and try something else for a particular month that I already processed.

      Thanks,
      redduke

      Comment


        #4
        Hello RedDuke,

        Thanks for your reply.

        There is no means to programmatically reload Ninjascript.

        What we suggest is using the Playback Connection with market replay data and use the "goto" feature to return to the specific start date.


        Paul H.NinjaTrader Customer Service

        Comment


          #5
          Thanks I was hoping for rewind chart feature via code

          Comment


            #6
            Another question, let's say I load 5 years of data, and then at some point during 2nd year I no longer care to finish indicator run. Is there any way to stop running it? Or do I need to let indicator to finish processing all years?

            Comment


              #7
              Hello RedDuke,

              Thanks for your reply.

              I am assuming the context here is a chart and not the strategy analyzer.

              You could add a button to the chart that you could click and have the script continue without processing its code below the return line. To clarify

              if (mybuttonClicked) return; // don't process code below this line once clicked
              Paul H.NinjaTrader Customer Service

              Comment


                #8
                Thank you. Yes in indicator on the chart

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by alifarahani, Today, 09:40 AM
                6 responses
                36 views
                0 likes
                Last Post alifarahani  
                Started by Waxavi, Today, 02:10 AM
                1 response
                17 views
                0 likes
                Last Post NinjaTrader_LuisH  
                Started by Kaledus, Today, 01:29 PM
                5 responses
                14 views
                0 likes
                Last Post NinjaTrader_Jesse  
                Started by Waxavi, Today, 02:00 AM
                1 response
                12 views
                0 likes
                Last Post NinjaTrader_LuisH  
                Started by gentlebenthebear, Today, 01:30 AM
                3 responses
                17 views
                0 likes
                Last Post NinjaTrader_Jesse  
                Working...
                X