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 cre8able, Yesterday, 01:16 PM
        3 responses
        11 views
        0 likes
        Last Post cre8able  
        Started by ChartTourist, Today, 08:22 AM
        0 responses
        6 views
        0 likes
        Last Post ChartTourist  
        Started by LiamTwine, Today, 08:10 AM
        0 responses
        2 views
        0 likes
        Last Post LiamTwine  
        Started by Balage0922, Today, 07:38 AM
        0 responses
        5 views
        0 likes
        Last Post Balage0922  
        Started by JoMoon2024, Today, 06:56 AM
        0 responses
        6 views
        0 likes
        Last Post JoMoon2024  
        Working...
        X