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

Referencing timeframe

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

    Referencing timeframe

    Hi guys.

    Is there a way to reference the time frame chosen in a strategy? I need it so I can create my secondary bars time-frame as I work in multiples of 3. For example if primary bars is selected as 1500 tick then secondary bars needs to be 500 tick. For example what I am trying to do is this.
    Initialize
    {
    eg. Add(PeriodType.Tick.PrimaryBars / 3);
    }

    Thanks

    Ash

    #2
    Hi Ash, unfortunately we could not support the dynamic addition of series - you can query the series you're working with over the BarsPeriod.Id and Value, however only outside of Initialize().

    For your need, I would create custom inputs for the series to load, so the user sets the timeframe to a third as needed via the input.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Cheers for the response Bertrand. Good idea, I will just create user inputs for the time frames as suggested.

      Thanks

      Ash

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by royhagerman, Today, 04:30 AM
      0 responses
      1 view
      0 likes
      Last Post royhagerman  
      Started by haas88, 03-21-2024, 02:22 AM
      18 responses
      208 views
      0 likes
      Last Post haas88
      by haas88
       
      Started by Board game geek, Today, 02:20 AM
      0 responses
      6 views
      0 likes
      Last Post Board game geek  
      Started by knighty6508, Today, 01:20 AM
      2 responses
      16 views
      0 likes
      Last Post knighty6508  
      Started by franatas, Today, 01:53 AM
      0 responses
      5 views
      0 likes
      Last Post franatas  
      Working...
      X