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 NullPointStrategies, Yesterday, 05:17 AM
        0 responses
        62 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        134 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        75 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        45 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        50 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X