Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Problem With MR and CurrentBars

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

    Problem With MR and CurrentBars

    Dear NinjaTrader,

    I've downloaded 3 month worth of MR data GBPUSD and EURUSD instruments (from 11/23/2014 to 2/23/2014). I'm running multiple instrument/period strategy and I need min BarsRequired of 31. However, when I connect to MR and go to say 1/11/2015 (which means there should be more than 31 daily bars loaded already) , there seems not enough bars loaded that satisfy minimum BarsRequired condition of my code and hence my strategy will not run.

    The daily EURUSD is the third added data series. So I put Print(CurrentBars[3].ToString()) in my code and regardless of what replay date I jump to, it always prints 0.

    So I'm pretty confused. What's the problem? It seems some kind of a bug to me.

    Thanks in advance.

    #2
    Hello arian_gh,

    Thanks for your post.

    When opening Market Replay and loading a chart all historical data on the chart will load from your historical data manager.
    I would recommend checking that you have the historical data under Tools> Historical Data Manager> Edit
    If you do not you will need to connect to a data feed who supplies this data and you can download it under Tools> Historical Data Manager> Download

    Comment


      #3
      Dear Brandon,

      I've already downloaded the whole 2014 tick data for EURUSD and GBPUSD. I can see in daily chart that bars are already loaded well before the running of my script. However CurrentBars[3] still returns 0. Unfortunately MR forward speed is not fast enough to let it run 31 days. And each time I jump to a new date the script restarts. So nothing is changed and virtually I can't run my code.

      Comment


        #4
        Hello arian_gh,

        Thanks for your reply.

        What type of chart is your strategy applied to? ( minute, day, tick, renko, etc)
        Does your multiple data series strategy run each of these addition instruments off of the charts bar types or is it also a multiple time frame strategy? If it is a multiple time frame strategy, what data does it run off of?

        Comment


          #5
          Dear Brandon,

          I have two series of daily data for GBPUSD and EURUSD. I Also have two series of 5 (or 10) minutes data also for GBPUSD and EURUSD. The main data set is 5 minutes EURUSD. Since I need to calculate historical volatility of the two instruments, each daily data set needs to have at least 30 (default value) or more bars in order to let the code to run.

          Comment


            #6
            Hello arian_gh,

            Thanks for your reply.

            Previously you mentioned you have tick data for these instruments during this time. Do you also have daily data during this time?
            How many Days To Load have you selected in the chart's data series?

            Comment


              #7
              I've selected 40, even 50 days to load. I also tried to load all of 4 data series in one chart, hoping this could fix it but no luck.
              When importing tick data I checked the options to generate minute and daily bars from data.

              Comment


                #8
                Strange enough, I restarted the NT7 and loaded the strategy with 50 days in data series, this time it worked like a charm,although the CurrentBars[3] shows 32 days of data.

                I'll try to see what exactly has changed since the last time and if I found a worthwhile thing to note, I'll post it here.

                Comment


                  #9
                  MR glitches?

                  There are definitely some serious glitches with MR. The ones that I've observed are:

                  1- When I add an strategy to MR and then shift the time backward my strategy either is removed from strategy list or stops working all by itself.

                  2- I have two pair of currencies: $GBPUSD and $EURUSD. My primary instrument is $EURUSD when I shift the time backwards, my working strategy suddenly switches to $GBPUSD for no obvious reason, the Irony is that after adding a strategy, you can't change the primary instrument anymore so I have to remove the script and load it again.

                  3- The problem that I mentioned in this thread was happening when I ran 64 bit version of NT7. The 32 bit version doesn't seem to have this problem.
                  Last edited by arian_gh; 02-25-2015, 04:23 AM.

                  Comment


                    #10
                    Hello arian_gh,

                    Thanks for your reply.

                    I will need a way to replicate this on our end to look into this further. Please write into platformsupport[at]ninjatrader[dot]com with your findings and attach a copy of your strategy so we can test it on our end.

                    Comment


                      #11
                      Sure, I'll send what I have observed so far. I hope this would be constructive.

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                      0 responses
                      648 views
                      0 likes
                      Last Post Geovanny Suaza  
                      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                      0 responses
                      369 views
                      1 like
                      Last Post Geovanny Suaza  
                      Started by Mindset, 02-09-2026, 11:44 AM
                      0 responses
                      108 views
                      0 likes
                      Last Post Mindset
                      by Mindset
                       
                      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                      0 responses
                      573 views
                      1 like
                      Last Post Geovanny Suaza  
                      Started by RFrosty, 01-28-2026, 06:49 PM
                      0 responses
                      575 views
                      1 like
                      Last Post RFrosty
                      by RFrosty
                       
                      Working...
                      X