Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

data series is unsupported

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

    data series is unsupported

    Code:
    AddLineBreak("ES 09-14", BarsPeriodType.Minute, 1, 3, MarketDataType.Last);
    i want to optimize both 'base bar period ' and 'line break count', so i created a variable and replaced it with the 1 and 3

    Code:
    baBar = 1
    linBreak = 3
    
    AddLineBreak("ES 09-14", BarsPeriodType.Minute, baBar, linBreak, MarketDataType.Last);
    then i should be able to optimize it by adding them to properties and using the optimization engine in strategy analyzer

    but it dosent work, it gives me this error in the log
    "Strategy 'linebr': Unable to load bars series. Your NinjaScript may be trying to use an additional data series dynamically in an unsupported manner."

    the script compiles with no issues

    also this works fine in NT7 only issue is in NT8.

    how do i complete this optimization with no errors ?

    #2
    Hello maaz1598,

    You cannot optimize the values for a secondary series. These must be hard coded and all data must be loaded before the optimization begins.

    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 into 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."


    This is also mentioned in the help guide on Multi-Time Frame & Instruments.


    If you hardcode the additional series, you can use a switch to prevent logic from processing during the OnBarUpdates for that BarsInProgress.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    42 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    20 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    29 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    46 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    38 views
    0 likes
    Last Post CarlTrading  
    Working...
    X