Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Is there a way to query rollover suggestions programmatically?

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

    Is there a way to query rollover suggestions programmatically?

    Hello guys,


    is there a way to query rollover suggestions programmatically?

    I'm aware of Instrument.MasterInstrument.RolloverCollection, but I'm asking if there a method maybe somewhere which could give me the actual suggested rollovers, I mean the one where volume is bigger on one contract compared to previous.

    Screenshot attached, what I would like to get programmatically.

    Thanks
    Attached Files

    #2
    Hello login_dejavu,

    Not that I am aware of, the suggestions in the menu shown should just be the current contract for the instrument. If you wanted to include volume information that would likely involve adding additional data series for those contracts to determine that. To otherwise find the rollovers in a similar way to the menu you could try doing something like what is being done in the public rollover indications indicator: https://ninjatraderecosystem.com/use...indications-2/

    I look forward to being of further assistance.

    Comment


      #3
      Thanks. No, what you posted is done via Instrument.MasterInstrument.RolloverCollection, but this has nothing to do with actual physical volume switch.
      Last edited by login_dejavu; 04-13-2020, 01:49 PM.

      Comment


        #4
        But could you tell maybe based on what logic NT rollover notification pushed?

        Just for context: my NT running in cloud and I have notification system about all activities, and I would like rollover also be part of it.

        Comment


          #5
          Hello login_dejavu,

          but this has nothing to do with actual physical volume switch.
          Right, If you wanted to include volume you would have to AddDataSeries to do that in a custom way.

          But could you tell maybe based on what logic NT rollover notification pushed?
          The in platform notifications are managed remotely, there is nothing in NinjaScript to monitor that event. The database menu is also not automatic nor is it using volume to determine rollovers, that is simply reporting the current contracts rollovers as defined in the database and allows you to press a button to automate rolling over the workspace. This is similar to what the rollover indicator is doing so if you wanted to incorporate rollover information in your script or automate a chart, that would be how to do that.

          In general the rollover process is not automatic to avoid leaving you in a position on a contract you are no longer trading. Rolling over is intended to be a user involved process.

          I look forward to being of further assistance.

          Comment


            #6
            Ok. thank you. Currently I did it the following:

            I collect all instruments which is used by NinjaTrader (positions/orders/strategies) and then check if Rollover Date is in less than 3 days from now, and if there is any I report once in 24 hours that there is rollover soon. I think this should work (for now).

            P.S. I understand manual aspect of it and low/high volume. My question was if you have it on client side is there a way to query it for me via code, or even if you're doing pull request to fetch it each time when Database window opens or NT starts, is there a way for me to do same request to your server with callback information about current pending rollovers.
            Attached Files
            Last edited by login_dejavu; 04-13-2020, 04:09 PM.

            Comment


              #7
              #login_dejavu if i understand your objective correctly, you want to be able to code rollover notifications based on actual volume as it is traded, rather than date. This is something I've requested/argued for (as an option, which other platforms offer) for years as date-based is unsatisfactory for some instruments (e.g. DAX) but fell on deaf ears (manually I put vol for current and forward contracts in market analyser).
              If you search the NT7 forum you should find some python code on how Sierra chart do it, in case it helps,

              Last edited by brucerobinson; 04-13-2020, 04:58 PM.

              Comment


                #8
                Originally posted by brucerobinson View Post
                #login_dejavu if i understand your objective correctly, you want to be able to code rollover notifications based on actual volume as it is traded, rather than date. This is something I've requested/argued for (as an option, which other platforms offer) for years as date-based is unsatisfactory for some instruments (e.g. DAX) but fell on deaf ears (manually I put vol for current and forward contracts in market analyser).
                If you search the NT7 forum you should find some python code on how Sierra chart do it, in case it helps,

                Yes, but my question was if NT guys doing this already pushing/pulling this from their server to clients, if I could access this data as well on client. Maybe I'm mistaken and Database window not doing any of that and only shows when date of rollover passed and ignoring all volume manual switches.

                Comment


                  #9
                  Originally posted by login_dejavu View Post
                  ....Database window not doing any of that and only shows when date of rollover passed and ignoring all volume manual switches.
                  That's correct

                  Comment


                    #10
                    Originally posted by brucerobinson View Post
                    That's correct
                    Uff, that is sad, then what I did kind of gives me notification similar as Database window. But I also can understand that this is not their (NT) job to do that (volumes logic switch notification), they might have it as bonus, but this is extra things which require additional resources.

                    Comment


                      #11
                      Hello login_dejavu,

                      P.S. I understand manual aspect of it and low/high volume. My question was if you have it on client side is there a way to query it for me via code, or even if you're doing pull request to fetch it each time when Database window opens or NT starts, is there a way for me to do same request to your server with callback information about current pending rollovers.
                      There is not a way for you to access the server yourself to access the database information, you would just access the relevant object in NinjaScript like the rollover collection.

                      Yes, but my question was if NT guys doing this already pushing/pulling this from their server to clients, if I could access this data as well on client. Maybe I'm mistaken and Database window not doing any of that and only shows when date of rollover passed and ignoring all volume manual switches.
                      The server only sends out general reminders for popular instruments to remind clients to rollover however this is not tied into the database or rollover window. The database gets its information from your input and also some defaults from the server when it is created or when other specific actions occur. The rollover window simply displays the rollovers for each instrument based on the information stored in the rollover collections. This all relates to the current date and works very similar to the rollover indicator, if you want to do a similar task that indicator is a great starting point.

                      But I also can understand that this is not their (NT) job to do that (volumes logic switch notification), they might have it as bonus, but this is extra things which require additional resources.
                      Yes this would take a large amount of resources to calculate that for every instrument. If that is something you want to include for the instruments you trade you can certainly do that but this type of analysis does not happen by default in the platform.


                      I look forward to being of further assistance.


                      Comment


                        #12
                        Thanks for detailed explanations!

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by NullPointStrategies, Yesterday, 05:17 AM
                        0 responses
                        62 views
                        0 likes
                        Last Post NullPointStrategies  
                        Started by argusthome, 03-08-2026, 10:06 AM
                        0 responses
                        134 views
                        0 likes
                        Last Post argusthome  
                        Started by NabilKhattabi, 03-06-2026, 11:18 AM
                        0 responses
                        75 views
                        0 likes
                        Last Post NabilKhattabi  
                        Started by Deep42, 03-06-2026, 12:28 AM
                        0 responses
                        45 views
                        0 likes
                        Last Post Deep42
                        by Deep42
                         
                        Started by TheRealMorford, 03-05-2026, 06:15 PM
                        0 responses
                        50 views
                        0 likes
                        Last Post TheRealMorford  
                        Working...
                        X