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

Do Not Merge AddDataSeries Spread Chart

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

    Do Not Merge AddDataSeries Spread Chart

    I'm trying to plot some spreads for historical data but NT8 is merging the future month contract for historical data. Because of this the spread is shown historically as 0. Only live data is being plotted with the correct spread amount. Is there a way that I can fix this?

    #2
    Hello habibalex,
    Thanks for your post.

    What specifically are you plotting? Is this an Ask and Bid Series or different instruments?

    Has the indicator been programmed to only plot in real time?
    Josh G.NinjaTrader Customer Service

    Comment


      #3
      I am plotting CL futures current month(CL 11-18) vs next month(CL 12-18). I am adding the Last price to the data series. The indicator has not been programmed for real time. It's looking for both historical and realtime. Just uses OBU Closes[0][0] - Closes[1][0].

      Comment


        #4
        Where are you seeing that the spread value is 0? In the NS Output window?

        Can I see a screenshot of your chart, NinjaScript Editor, and NS Output window?
        Josh G.NinjaTrader Customer Service

        Comment


          #5
          https://imgur.com/a/xTxAts0 it is showing 0 on the plot for historical bars. Once the data is real-time it shows the correct values.

          Comment


            #6
            Is your merge policy set to "Do not merge"?
            Josh G.NinjaTrader Customer Service

            Comment


              #7
              no, it's merge non-back adjsuted

              Comment


                #8
                Try this:
                1. Set your merge policy to "Do not merge"
                2. Right click in your chart>>Reload all historical data
                3. Reapply indicator.


                Does this produce the results you are looking for?
                Josh G.NinjaTrader Customer Service

                Comment


                  #9
                  that will end up changing the rest of my charts. I still need to merge non-backadjusted for CL / ES charts.

                  It also doesn't make sense that live data would pull the correct next month contract prices, and only historical data gets merged from the current month. That seems like a bug to me, right?

                  Comment


                    #10
                    I still need to merge non-backadjusted for CL / ES charts.
                    You would still be able to do this. Just go to your Control Center>>Tools>>Instruments>>select CL or ES and set the instruments merge policy to non back adjusted.

                    Did following my steps get the desired results?
                    Josh G.NinjaTrader Customer Service

                    Comment


                      #11
                      it works, but then my daily OHLC levels are all messed up going more than 1 month back in CL and ES

                      Comment


                        #12
                        Did you go to your Control Center>>Tools>>Instruments>>select CL or ES and set the instruments merge policy to non back adjusted?

                        What makes you say they the OHLC values are messed up? What are you comparing them to?
                        Josh G.NinjaTrader Customer Service

                        Comment


                          #13
                          Did you go to your Control Center>>Tools>>Instruments>>select CL or ES and set the instruments merge policy to non back adjusted?
                          Yes, this works as expected and I am able to plot historical spreads.

                          What makes you say they the OHLC values are messed up? What are you comparing them to?
                          Yes this works as expected. They are only pulling from the current contract instead of non-backadjusted contracts, to plot values that most others use for OHLC daily, weekly, monthly, quarterly, yearly levels I want the merge non-backadjusted setting.

                          I'm trying to plot the historical spreads. But when merge non-backadjusted is selected the FUTURE month contract values are being pulled into the current contract. That shouldn't happen as it there is no 'back'. Only live data is plotted correctly using the merge non-backadjusted setting.

                          Comment


                            #14
                            But when merge non-backadjusted is selected the FUTURE month contract values are being pulled into the current contract.
                            This is because anytime you merge contracts with "Merge Back Adjusted" and "Merge Non Back Adjusted" the contracts are going to be merged historically. If you add both data series to a chart and compare each bar this will be easy to see.

                            At this time the only way to get your plot to work the way you want it to will be by using the "Do not merge" setting for all of your instruments or specifically for the CL/ES.
                            Last edited by NinjaTrader_JoshG; 10-03-2018, 01:56 PM.
                            Josh G.NinjaTrader Customer Service

                            Comment


                              #15
                              can you put in a request to fix this bug or provide a way to access unmerged data through an indicator?

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by elirion, Yesterday, 09:32 PM
                              0 responses
                              6 views
                              0 likes
                              Last Post elirion
                              by elirion
                               
                              Started by cre8able, Yesterday, 09:15 PM
                              1 response
                              8 views
                              0 likes
                              Last Post bltdavid  
                              Started by cummish, Yesterday, 08:43 PM
                              0 responses
                              14 views
                              0 likes
                              Last Post cummish
                              by cummish
                               
                              Started by Option Whisperer, Yesterday, 07:58 PM
                              4 responses
                              21 views
                              0 likes
                              Last Post Option Whisperer  
                              Started by ETFVoyageur, 05-07-2024, 07:05 PM
                              13 responses
                              87 views
                              0 likes
                              Last Post ETFVoyageur  
                              Working...
                              X