Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator stops updating sometimes

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

    Indicator stops updating sometimes

    The following code stops plotting to the chart all the time when running on intraday data and updating every tick. If I format the indicators it will update but it will stop again after awhile. When it stops updating the plot to the chart, I believe it also does not alert but it does continually update the number at the right of the screen.

    {
    if (CurrentBar < 4)
    return;
    if (Bars.PercentComplete>0)
    {
    Plot0.Set(Volume[0] /Bars.PercentComplete);
    }


    if (Volume[0] /Bars.PercentComplete > 1.2 *Volume[1])
    {
    if (alarmOn ==1)
    {
    Alert("myAlert", NinjaTrader.Cbi.Priority.High, "PRV", "Alert1.wav", 90, Color.Black, Color.Yellow);
    }
    }

    }

    #2
    If an indicator stop working you will see an error message in the log of the Control Center window with some idea of the error being generated. If the indicator stops plotting, you will have to do some further debugging to see why the Plot0.Set() method is not being called...or what value is actually being set.
    RayNinjaTrader Customer Service

    Comment


      #3
      I already solved this one a couple of weeks ago. I'd bet you're still getting a divide by zero.

      See: http://www.ninjatrader-support.com/v...ead.php?t=3761

      Comment


        #4
        Shoot, I protected it against divide by zero in the first part of the code but not in the alert part... thanks...
        Last edited by maxpi; 11-09-2007, 10:31 AM.

        Comment


          #5
          Even after getting all the divide by zero problems out of the code it still stopped plotting exactly the same. I had to move the plot0 statement so it was not dependent on the Bars.PercentComplete>0 condition, now it seems to run all the time like it should.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by pdennis, Today, 07:43 AM
          1 response
          5 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by NinjaTrader_Brandon, Today, 07:49 AM
          0 responses
          8 views
          0 likes
          Last Post NinjaTrader_Brandon  
          Started by b16_aln, Today, 05:15 AM
          1 response
          7 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by Negustrader, Today, 01:01 AM
          1 response
          16 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by soon123, Yesterday, 10:50 PM
          1 response
          10 views
          0 likes
          Last Post NinjaTrader_ChrisL  
          Working...
          X