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

Bars Series Discrepency

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

    Bars Series Discrepency

    Hey guys i just noticed a serious problem in one of my strategies. I have a strategy that runs on the ES 5 minute bars. I added two other bar series to the strategy one is an unrelated series 5 minute bars the other series is

    Add("ES 12-14", PeriodType.Minute, 5); This is of course the same series as the primary series.

    I then have a statement like:

    Print: Close[0] + " " + Closes[2][0]

    The problem is that Closes[2][0] sometimes prints the same value as Close[0] as it should but in other cases it prints a value 6 to 8 points below the Close[0]. Whats wrong with the strategy?

    Thanks,
    EliteTraderNYC

    #2
    Hello elitetradernyc,

    Thank you for your post.

    Print the values you want to check not just Close[0]. If you want to compare the primary to the third series use Closes[0][0] and Closes[2][0].

    Comment


      #3
      Hi, maybe you misunderstood my question. Closes[0][0] should equal Closes[2][0] right? because they are both ES 5 minute series, but they do not? I just tried again.

      Comment


        #4
        Hello elitetradernyc,

        Thank you for your response.

        I understood your request, however my tests show that the values are always the same. Please provide the code you are using to test.

        Comment


          #5
          Figured it out, this is caused when a backtest is run on ES 09-14 when the secondary data series included within the strategy is actually ES 12-14.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by algospoke, Yesterday, 06:40 PM
          2 responses
          22 views
          0 likes
          Last Post algospoke  
          Started by ghoul, Today, 06:02 PM
          3 responses
          14 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by jeronymite, 04-12-2024, 04:26 PM
          3 responses
          45 views
          0 likes
          Last Post jeronymite  
          Started by Barry Milan, Yesterday, 10:35 PM
          7 responses
          21 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by AttiM, 02-14-2024, 05:20 PM
          10 responses
          181 views
          0 likes
          Last Post jeronymite  
          Working...
          X