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

Time frame

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

    Time frame

    NinjaTrader support Indicators, Is there a way programmatically that various time frames can be add to an indicator (5m to Wk1) in list series and selected singly where necessary.(single indicator with multiple timeframe.) Thanks.
    Last edited by Emma1; 10-28-2019, 04:20 PM.

    #2
    Hello Emma1,

    Thanks for your post.

    Yes, you can create an indicator that accesses all of the time frames however they (all of the time frames) would have to be hardcoded because the AddDataSeries() does not support dynamic (selective) loading. From the help guide: Arguments supplied to AddDataSeries() should be hardcoded and NOT dependent on run-time variables which cannot be reliably obtained during State.Configure (e.g., Instrument, Bars, or user input). Attempting to add a data series dynamically is NOT guaranteed and therefore should be avoided. Trying to load bars dynamically may result in an error similar to: Unable to load bars series. Your NinjaScript may be trying to use an additional data series dynamically in an unsupported manner. https://ninjatrader.com/support/help...dataseries.htm

    The indicator would have to load all of the time frames which would not be very efficient but would provide the flexibility. Your "selection" then would direct the OnBarUpdate() coding to use the selected time frame.
    Paul H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by DJ888, Today, 10:57 PM
    0 responses
    1 view
    0 likes
    Last Post DJ888
    by DJ888
     
    Started by MacDad, 02-25-2024, 11:48 PM
    7 responses
    158 views
    0 likes
    Last Post loganjarosz123  
    Started by Belfortbucks, Today, 09:29 PM
    0 responses
    7 views
    0 likes
    Last Post Belfortbucks  
    Started by zstheorist, Today, 07:52 PM
    0 responses
    7 views
    0 likes
    Last Post zstheorist  
    Started by pmachiraju, 11-01-2023, 04:46 AM
    8 responses
    151 views
    0 likes
    Last Post rehmans
    by rehmans
     
    Working...
    X