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 pmachiraju, 11-01-2023, 04:46 AM
                8 responses
                149 views
                0 likes
                Last Post rehmans
                by rehmans
                 
                Started by mattbsea, Today, 05:44 PM
                0 responses
                5 views
                0 likes
                Last Post mattbsea  
                Started by RideMe, 04-07-2024, 04:54 PM
                6 responses
                33 views
                0 likes
                Last Post RideMe
                by RideMe
                 
                Started by tkaboris, Today, 05:13 PM
                0 responses
                5 views
                0 likes
                Last Post tkaboris  
                Started by GussJ, 03-04-2020, 03:11 PM
                16 responses
                3,283 views
                0 likes
                Last Post Leafcutter  
                Working...
                X