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

How to get "real" previous day close value?

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

    #31
    kdoren,

    It is not "screwing" with the data. It is behaving exactly as defined by the option set out for it. If MergeBackAdjusted or MergeNonBackAdjusted are set it will merge based on the rollover dates of the contract months defined in the Instrument Manager for that instrument. If you want non-merged data DoNotMerge, as you have pointed out, is the way to achieve it.

    These merge settings only make sense when using front months and not the ##-## continuous contracts. ##-## are already merged by your data provider and provided as-is. There is never a need to use any merge settings for such contracts. The merge policies are there for people who want continuous contracts, but do not have the convenience of having such contracts available from their data providers or who find their data provider's continuous contract data to be inferior or different than regular contracts.
    Josh P.NinjaTrader Customer Service

    Comment


      #32
      So, if I call up a ZC 07-11 chart on May 2, you think the default behavior should be for NT7 to change the April 28 prices displayed on the chart? To something that isn't the ZC 07-11 price or the ZC 05-11 price? Aren't the best prices to display for April 28 for the ZC 07-11 contract ... the April 28 quotes for the ZC 07-11 contract? I could see substituting the back-adjusted front-month contract if you are going back far enough that the trading volume is really low, but not in a case like this.

      In my opinion, default behavior should be to pass through the prices from the datafeed, If people want NT7 to change the prices, they should have to select that.
      Last edited by kdoren; 05-03-2011, 03:45 AM. Reason: Removed attachment, see more recent post for updated version

      Comment


        #33
        Thanks for the feedback.

        Comment


          #34
          Here's an updated indicator, which will throw an exception (and log an explanatory error message) if the data isn't set to "Do Not Merge" . I concluded that's the best of several bad options: the indicator output will be wrong otherwise, but trying to force "DoNotMerge" programatically in the indicator raises some issues of its own.

          I've also updated it to work with other grain futures (corn, wheat, rice, soybeans, soybean oil, soybean meal, oats). It will need to be edited whenever CMEgroup changes the limit rules.

          Let me know how it works for you; if/when it's stable I'll post it in the indicators section.
          Attached Files
          Last edited by kdoren; 05-03-2011, 04:28 AM.

          Comment


            #35
            Great work!!! It works correctly. I would like to thank you all for your comments especially to KDOREN who has done the most of the work. Thanks!

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by wzgy0920, 04-20-2024, 06:09 PM
            2 responses
            26 views
            0 likes
            Last Post wzgy0920  
            Started by wzgy0920, 02-22-2024, 01:11 AM
            5 responses
            32 views
            0 likes
            Last Post wzgy0920  
            Started by wzgy0920, Yesterday, 09:53 PM
            2 responses
            49 views
            0 likes
            Last Post wzgy0920  
            Started by Kensonprib, 04-28-2021, 10:11 AM
            5 responses
            192 views
            0 likes
            Last Post Hasadafa  
            Started by GussJ, 03-04-2020, 03:11 PM
            11 responses
            3,234 views
            0 likes
            Last Post xiinteractive  
            Working...
            X