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

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.
    Kate W.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by f.saeidi, Today, 01:32 PM
    1 response
    2 views
    0 likes
    Last Post NinjaTrader_Erick  
    Started by mmckinnm, Today, 01:34 PM
    0 responses
    3 views
    0 likes
    Last Post mmckinnm  
    Started by traderqz, Today, 12:06 AM
    9 responses
    16 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by kevinenergy, 02-17-2023, 12:42 PM
    117 responses
    2,766 views
    1 like
    Last Post jculp
    by jculp
     
    Started by Mongo, Today, 11:05 AM
    5 responses
    15 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Working...
    X