Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Take parameter as the condition to decide adddataseries

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

    Take parameter as the condition to decide adddataseries

    I having testing in my strategy analyzer with the optimization type.

    I will add the dataseries however when i use 1 of the parameter as the condition, it will always show false.
    Can i know how to overcome this ???

    #2
    Hello cincai,

    Thank you for your post.

    Are you attempting to dynamically add a data series based on specific conditions? Dynamically adding a data series is unsupported, and specifically for optimizations will not work. From our 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."

    If you use a variable to select the instrument, bar type, or interval of a secondary series, this variable cannot be optimized over.

    Any added dataseries cannot change between optimizations.

    Please let us know if we may be of further assistance to you.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    83 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    47 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    29 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    32 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    66 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X