Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Intermittent Indicator Problem...

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

    Intermittent Indicator Problem...

    I've got a problem with a few indicators (not sure if it's indicator specific)

    When I went to plot the CCI directly, I got only a single red line at 0

    When I calculated the CCI and assigned to a double, and then plotted the double, all was fine.

    I printed the values of Input, CCI(Input,10)[0] and ccivalue (a double)

    What I found was that CCI(Inpute,10)[0] had a value of 0, while the computed double and Input values were what I'd expect.




    Here's the code I was using:

    Code:
    double cciout = CCI(Input,10)[0];
    
    // Always works
    //Plot0.Set(cciout);
    
    // Sometimes works			
    Plot0.Set(CCI(Input,10)[0]);
    
    // always prints values			
    Print("cciout    : " + cciout);
    Print("Input[0]  : " + Input[0]);
    
    // Sometimes just prints 0 for entire history
    Print("Input(CCI): " + CCI(Input,10)[0]);
    I've had it happen with FastStochastics and CCI, though I suspect that Its not indicator specific.

    It does seem to finally start producing values if I open another indicator and come back to it....

    I don't see any error's in the log window. Is there an actual log file I can check into?

    I can't reproduce it all the time, but I wanted to document for future reference, and see if anyone else has seen this.


    Matt

    #2
    tazatek, could you please post the complete code here so we can test this out? And if you can reproduce it consistently please let us know how.
    AustinNinjaTrader Customer Service

    Comment


      #3
      OK

      I think I have a reproducible indicator here that shows the problem

      In the indicator, if I have a variable and hand it into certain indicators (Stochastics in my example), then a zero value is returned.

      However, if a literal number is handed in as parameters, it works just fine.

      Another interesting thing is that even if the value is 0, the value of Values[0] has the right value, but isn't plotted.

      I've commented the indicator, and there is a true/false loop so that you can easily see the indicator in action both working and not working.

      Matt


      PS - no errors in the logs noted.
      Attached Files

      Comment


        #4
        More weird things that I think are related (but perhaps not)


        1. My lines are holding state that they shouldn't. I've changed all my lines (ALL OF THEM) to have a value of transparent when they start up. But when I open the indicator (in a new chart, or even after NT restart)... all my old lines are showing up. Some of them are in logic loops that should never even get seen!!!

        My thought is that the DB is somehow holding onto state, and not letting go when it should. I've reset/repaired the DB w/o success.

        2. After I shutdown NT, waited for about 30 seconds for all processes to complete, and restarted, NT started, but with an added message that only one instance can be run. I've only had it happen once, so maybe I double tapped, but it could also be that NT isn't completely shutting down, or taking too long to shut down.

        All this leads me to believe that mis-matched memory/object correlation is happening somewhere. I'm fully aware that it could be that I'm not conforming to newer NT 7 standards, but I'll need someone to point out what I'm doing wrong to help out.


        I was thinking.... Is it possible that for the beta versions, we need to completely wipe out the old install before installing the new? Could there be incompatibilities from older versions to the newer?

        Matt

        Comment


          #5
          Please see my response in your other thread. The issue is with the Indicator = Stochastics() line.
          Josh P.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          636 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          366 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          107 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          569 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          571 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X