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

Access 'Data Series' properties of Strategy Analyzer while in SetDefaults

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

    Access 'Data Series' properties of Strategy Analyzer while in SetDefaults

    Hi.

    Is there a way to access 'Data Series' properties of the Strategy Analyzer window while in SetDefaults state?

    We have existing code, which opens up a window, that shows up as one of the 'Parameter' properties and it works when used in an indicator because we are able to tap onto the active chart and get data from there.

    When used in a strategy, for backtesting, there is no chart opened and 'Data Series' in the Strategy Analyzer is yet to be set by the user. Setting the Instrument prop triggers SetDefaults but selected value cannot be accessed thru Instrument prop in the strategy though.

    For now, the temporary solution is to have an actual chart open with same Data Series prop values to be used in the Strategy Analyzer and this should allow coding to continue.

    So is there a way to access the 'Data Series' props or any of the props in the Strategy Analyzer while in SetDefaults state?

    Thanks.

    #2
    Hello cmarkb,

    Thank you for your post.

    Accessing Instrument information prior to State.DataLoaded is unsupported and should be avoided for the reasons you're running into here.

    This is noted in our help guide here:



    There would not be a supported way to access Instrument from State.SetDefaults reliably.

    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 RookieTrader, Today, 09:37 AM
    2 responses
    10 views
    0 likes
    Last Post RookieTrader  
    Started by alifarahani, Today, 09:40 AM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by Gerik, Today, 09:40 AM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by KennyK, 05-29-2017, 02:02 AM
    3 responses
    1,285 views
    0 likes
    Last Post NinjaTrader_Clayton  
    Started by AttiM, 02-14-2024, 05:20 PM
    11 responses
    186 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Working...
    X