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

Premium spread

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

    Premium spread

    Hi,

    Is it possible to calculate the spread between the same instrument contracts with expiries ?

    for example: the spread between GC 06-08 and GC 08-08 ...etc.


    P.s: i'm getting a constant spread of all the times

    #2
    Hello bassam,

    Thank you for your post.

    This is possible through custom programming. For an example of calculating spreads between two instruments please visit the following link: http://www.ninjatrader.com/support/f...d=4&linkid=512

    While the above link does not detail expiries, it does give an example of calculating spreads between two instruments.

    Comment


      #3
      Thank you Patrick,

      If you open a new chart with two instruments added " GC 02-13" and next contract "GC 04-13", you'll notice the following:
      -From 29-11-2013 until 30-01-2013 (which is the trading period of GC 02-13), the difference between the close values of the two instruments = constant 1.6$. I tried the same on other instruments like HO still getting constant spread!

      What am I missing here ?
      Last edited by bassam; 05-06-2013, 05:32 AM.

      Comment


        #4
        Hello bassam,

        Thank you for your response.

        Please attach a screenshot of the chart with an incorrect spread to your response so I may investigate this matter further.

        I look forward to assisting you further.

        Comment


          #5
          Kindly find attached screenshot as per your request.

          I've added a small indicator which subtract the closes of those two instrument to be more clear.
          Also Rollover indicator to indicate rollover dates.
          Attached Files

          Comment


            #6
            Hello bassam,

            Thank you for your response.

            This is due to the Merge Policy used. You can change the Merge Policy by going to the NinjaTrader Control Center > Tools > Options > Data > Merge Policy.

            Set the Merge Policy to DoNotMerge and then reload all historical data on your charts. You should see that there is not a constant difference in the data but a varying value.

            For information on Merge Policies please visit the following link: http://www.ninjatrader.com/support/h...rical_data.htm

            Please let me know if I may be of further assistance.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by zstheorist, Today, 07:52 PM
            0 responses
            5 views
            0 likes
            Last Post zstheorist  
            Started by pmachiraju, 11-01-2023, 04:46 AM
            8 responses
            150 views
            0 likes
            Last Post rehmans
            by rehmans
             
            Started by mattbsea, Today, 05:44 PM
            0 responses
            6 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
            6 views
            0 likes
            Last Post tkaboris  
            Working...
            X