Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Instrument Selector Not Providing Latest Future Expiry

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

    Instrument Selector Not Providing Latest Future Expiry

    NT 8.0.24.2

    In an AddOn, an Instrument Selector has M6A typed into it and the M6A Instrument in the list double-clicked. The current M6A expiry dated Instrument (M6A 06-21) is correctly selected.

    In the same Instrument Selector, type M6C and double-click produces M6C 12-20 ... which, obviously, is not correct. Several other Future Instruments behave similarly (e.g. M6J, M6S).

    The same behaviour occurs in the Instrument Selector of a Basic Entry window.

    The same (mis-)behaviour also occurs programmatically with:
    Code:
    Instrument.GetInstrument(<Future Symbol>+" ##-##").MasterInstrument.GetNextExpiry(DateTime.Now).ToString("MM-yy")
    Why? Is this an issue that requires a correction to the relevant MasterInstrument data?

    Thanks.
    Last edited by jeronymite; 05-24-2021, 07:49 PM. Reason: Additional information
    Multi-Dimensional Managed Trading
    jeronymite
    NinjaTrader Ecosystem Vendor - Mizpah Software

    #2
    A quick test of all Future Instruments in the MasterInstrument List produced the following list of 24 incorrect Future Expiry dated Instruments (using the code above).
    • BANKNIFTY 12-20
    • BGI 12-20
    • BHARTIARTL 12-20
    • CCM 11-20
    • DD 12-14
    • DDI 12-20
    • DJ 12-20
    • EUR 12-20
    • HP 11-20
    • ICF 12-20
    • ISP 12-20
    • J 12-20
    • M6C 12-20
    • M6J 12-20
    • M6S 12-20
    • MPP 12-17
    • NIFTY 12-20
    • RC 12-20
    • RF 12-18
    • TF 06-18
    • TRE 12-20
    • WBG 12-20
    • WCF 12-20
    • Y 12-20
    Definitely an issue with the MasterInstrument List, I think. [And this was after updating the Database with the latest Future Expiry dates.]

    And this is repeatable in a Basic Entry window.

    Thanks.
    Last edited by jeronymite; 05-24-2021, 07:51 PM.
    Multi-Dimensional Managed Trading
    jeronymite
    NinjaTrader Ecosystem Vendor - Mizpah Software

    Comment


      #3
      Hello jeronymite,

      Thank you for your note.

      The symbol M6C, along with others on this list, have been delisted by the CME, which is why there is not a current expiry for those symbols in the database. I wouldn't expect the code to be able to programmatically access a contract month that does not exist in the database.

      The appropriate symbol for M6C, for example, is MICD 06-21. Instruments that are not delisted and have yet to be updated to the current expiry can always be rolled over via Tools > Database Management > Rollover.

      Should you still need help from our NinjaScript Support team regarding your code, please let us know and I'll have a representative reach out for further assistance.

      Let us know if we may assist further.

      Comment


        #4
        Thanks, Chris. That's very helpful! I hadn't realised those had been delisted.
        Multi-Dimensional Managed Trading
        jeronymite
        NinjaTrader Ecosystem Vendor - Mizpah Software

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by GussJ, 03-04-2020, 03:11 PM
        11 responses
        3,227 views
        0 likes
        Last Post xiinteractive  
        Started by andrewtrades, Today, 04:57 PM
        1 response
        13 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by chbruno, Today, 04:10 PM
        0 responses
        7 views
        0 likes
        Last Post chbruno
        by chbruno
         
        Started by josh18955, 03-25-2023, 11:16 AM
        6 responses
        440 views
        0 likes
        Last Post Delerium  
        Started by FAQtrader, Today, 03:35 PM
        0 responses
        12 views
        0 likes
        Last Post FAQtrader  
        Working...
        X