Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Error when running Strategy Analyzer Optimization - How to debug?

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

    Error when running Strategy Analyzer Optimization - How to debug?

    Hi there,

    I get this error when using the Strategy Analyzer with Optimization turned on. It works fine in Backtest mode, but any of the other options fail.

    My strategy is using the volumetric bars, and I have confirmed that DataLoaded is never called after the volumetric bars have been added. Anyone know what I'm doing wrong here?
    else if (State == State.Configure)
    {

    AddVolumetric(Instruments[0].FullName, BarsPeriodType.Range, 15, VolumetricDeltaType.BidAsk, 1);

    }​
    Click image for larger version  Name:	image.png Views:	0 Size:	6.6 KB ID:	1243152
    Last edited by Magzor; 03-28-2023, 06:03 AM.

    #2
    You cannot use Instruments in State.Configure reliably. Change that parameter Instruments[0].FullName to null.
    Bruce DeVault
    QuantKey Trading Vendor Services
    NinjaTrader Ecosystem Vendor - QuantKey

    Comment


      #3
      Thanks Bruce! It works now

      Comment


        #4
        Originally posted by QuantKey_Bruce View Post
        You cannot use Instruments in State.Configure reliably
        My impressions about this have changed slightly.

        In some places you can, and in some places you cannot.

        The Strategy Analyzer is one place you cannot.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        80 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        40 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        63 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        63 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