Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Auto rollovers

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

    Auto rollovers

    Hello, I'm developing an auto trading addon and would like the have the code access the following details automatically without manual intervention. Please let me know if it's possible:

    1) Is it possible to programmatically query what is the currently active contract name for an instrument? e.g. If I give the name is ES it will give me 03-22?

    2) Is it possible to programmatically query Trading Hours and Holidays schedules?

    3) I occasionally get popups for Auto Rollover Notification. Is it possible to preset all instruments I want to auto rollover ahead of time and never get this popup?

    Thanks!
    Attached Files

    #2
    Hello CarpetHooligan,

    Yes, this can be coded in a script.

    Below is a link to the RolloverIndications indicator which has sample code.
    Shows a button on the chart to roll the expiry to the next available contract month. Option to hide button until a number of days before or on roll date. Another option to confirm by opening the instrument overlay selector or automatically rollover without confirmation. (Update June 27th, 2019 – Added an option to show […]


    The popups are from windows in the workspace as well as instruments in the instrument list.

    You could choose to roll these over from Tools -> Database management -> rollover before they are expired to avoid the popup.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    42 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    20 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    29 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    46 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    38 views
    0 likes
    Last Post CarlTrading  
    Working...
    X