Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Plot Class limitation

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

    Plot Class limitation

    I'm getting this error...
    2010-10-29 13:09:06:913 ERROR: Error on setting indicator plot for indicator 'dtNWAESR3Pred4'. Value outside of valid range.

    What is the value range for the Plot class?

    Here are the last four values before the error...
    10/8/2010 1:45:00 PM CurrentBar = 13045 Predicted4 = -7.46232370763826E+35 ---------dtNWAESR3Pred4--------
    10/8/2010 1:50:00 PM CurrentBar = 13046 Predicted4 = -8.04757521320876E+35 ---------dtNWAESR3Pred4--------
    10/8/2010 1:55:00 PM CurrentBar = 13047 Predicted4 = -8.61382411033831E+35 ---------dtNWAESR3Pred4--------
    10/8/2010 2:00:00 PM CurrentBar = 13048 Predicted4 = -6.76559066876382E+35 ---------dtNWAESR3Pred4--------

    #2
    Hello zacharydw00,

    Plots use double values. I believe this is up to 15 digits.

    Rounds a value to the nearest integer or to the specified number of fractional digits.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      When I use this code to limit the values, it still crashes...

      Predicted4.Set(Math.Max(double.MinValue, Math.Min(double.MaxValue, dPredicted4)));

      So it appears the Plot class can't accept the full range of a double.

      Edit:
      Even this causes an error...
      Predicted4.Set(Math.Max((double.MinValue/10000), Math.Min((double.MaxValue/10000), dPredicted4)));
      Last edited by zacharydw00; 10-29-2010, 02:11 PM.

      Comment


        #4
        Unfortunately those are still invalid values.

        Examples of unreasonable values:
        Plot0.Set(double.MaxValue);
        Plot0.Set(double.NaN);
        Plot0.Set(9999999999999999999999999.0);
        Plot0.Set(double.PositiveInfinity);
        Plot0.Set(double.MinValue);
        Plot0.Set(double.NegativeInfinity);
        Plot0.Set(-9999999999999999999999999.0);

        Your number is up to 35 decimal points. I suggest using Math.Round() until you can identify a suitable value.


        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          Could you please just tell me what the valid maximum and valid minimum values are for the Plot class, or do you not know?
          Thx.

          Comment


            #6
            I do not know the exact minimum and maximum values. I'd start with 15 decimal places and then reduce as needed.
            Ryan M.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            599 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            344 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            103 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            558 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            557 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X