Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicators in Strategy Analyzer

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

    Indicators in Strategy Analyzer

    Custom indicators when I add them to charts seem to work fine, but when I add them to a strategy using AddChartIndicator and run a back test in the Strategy Analyzer I get errors when I try to access bar information and receive "object reference not set to an instance of an object".

    Here is an example:
    Attached Files

    #2
    Originally posted by GrumpyTrader View Post
    Custom indicators when I add them to charts seem to work fine, but when I add them to a strategy using AddChartIndicator and run a back test in the Strategy Analyzer I get errors when I try to access bar information and receive "object reference not set to an instance of an object".
    Try adding

    Code:
     [COLOR=#080808]IsInstantiatedOnEachOptimizationIteration[/COLOR][COLOR=#000000] = [/COLOR][COLOR=#0000ff]true[/COLOR][COLOR=#000000];[/COLOR]
    to the State.Defaults of the Strategy and and see if that helps..


    -=Edge=-
    NinjaTrader Ecosystem Vendor - High Tech Trading Analysis

    Comment


      #3
      Hi Edge,
      That actually didn't work. Not sure what else to try.
      Last edited by GrumpyTrader; 09-07-2015, 11:32 AM.

      Comment


        #4
        After debugging through this it seems the issue is where an indicator calls another indicator from a strategy.

        To reproduce the problem:
        a) import my example (include an indicator Gt_Vwap and a strategy _Tmp ) The only thing the strategy does is call AddChartIndicator (Gt_Vwap)
        b) Run a back test in Strategy Analyzer on _Tmp strategy with the display set to Summary (should run fine)
        c) After back test is completed switch to the Chart display in Strategy Analyzer ( you should see a bunch of errors come through the Control Center Log)

        To correct the problem:
        a) Modify Gt_Vwap indicator to use the Volume[0] object instead of VOL()[0] indicator
        b) Solves the errors. Clearly they both should work.
        Last edited by GrumpyTrader; 09-07-2015, 12:11 PM.

        Comment


          #5
          Hello,

          I was able to use the provided example to create a test that demonstrates the issue explained in this post. I have submitted this to development for review, If I have any further updates I will post them here.

          I look forward to being of further assistance.
          JesseNinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by geddyisodin, 04-25-2024, 05:20 AM
          8 responses
          60 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by jxs_xrj, 01-12-2020, 09:49 AM
          4 responses
          3,287 views
          1 like
          Last Post jgualdronc  
          Started by Option Whisperer, Today, 09:55 AM
          0 responses
          5 views
          0 likes
          Last Post Option Whisperer  
          Started by halgo_boulder, 04-20-2024, 08:44 AM
          2 responses
          22 views
          0 likes
          Last Post halgo_boulder  
          Started by mishhh, 05-25-2010, 08:54 AM
          19 responses
          6,189 views
          0 likes
          Last Post rene69851  
          Working...
          X