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

In Initialize, how to know the master data's Period Type?

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

    In Initialize, how to know the master data's Period Type?

    Hi,

    I want to load additional data according to the master data's period type. Say, the master data is SPY daily, so I want to load VIX daily too. If master day is SPY 60 min, I want to load VIX 60 min too. So idealy, in Initialize() function, I can call:

    Add( additionalSymbol, this.BarsPeriod.Id, this.BarsPeriod.Value ) ;

    But unfortunately, according to your help file, the BarsPeriod property cannot be access in Initialize function. And I did try to call it and indeed it failed to work.

    So in order to load additional data I have to add 2 other parameters to ask for period type (day or minute data) and period value (1 day or 2 days, 1 min or 60 min).

    My question is: Is there any easy way I can know the master data's period type in Initialize function?

    Thanks.

    #2
    Hi CobrasMarketView, dynamic adding would unfortunately not be supported by us as you could run into race condition in loading as you noted correctly. We would therefore suggest setting the fields per user inputs.

    That being said, I've added your vote to an enhancement request we run on this item in our product management tracking lists.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      I hope you can add this feature, this is simple and very useful.
      It is a nightmare to switch instrument period and indicator inputs manualy every time...

      Is defining period as user parameter the only workaround?

      Comment


        #4
        Welcome to the forums Ivan and yes your understand is correct.

        I'm adding a vote on your behalf into this item as well for consideration.
        BertrandNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by knowmad, Today, 03:52 AM
        0 responses
        14 views
        0 likes
        Last Post knowmad
        by knowmad
         
        Started by tradingnasdaqprueba, Today, 03:42 AM
        0 responses
        10 views
        0 likes
        Last Post tradingnasdaqprueba  
        Started by Haiasi, 04-25-2024, 06:53 PM
        4 responses
        63 views
        0 likes
        Last Post effraenk  
        Started by ccbiasi, 11-23-2017, 06:06 AM
        5 responses
        2,205 views
        0 likes
        Last Post leodavis  
        Started by kujista, Yesterday, 12:39 AM
        2 responses
        14 views
        0 likes
        Last Post kujista
        by kujista
         
        Working...
        X