Announcement

Collapse
No announcement yet.

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.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    81 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    41 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    64 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    66 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    54 views
    0 likes
    Last Post CarlTrading  
    Working...
    X