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 CaptainJack, 05-29-2026, 05:09 AM
            0 responses
            214 views
            0 likes
            Last Post CaptainJack  
            Started by CaptainJack, 05-29-2026, 12:02 AM
            0 responses
            130 views
            0 likes
            Last Post CaptainJack  
            Started by charlesugo_1, 05-26-2026, 05:03 PM
            0 responses
            146 views
            0 likes
            Last Post charlesugo_1  
            Started by DannyP96, 05-18-2026, 02:38 PM
            1 response
            230 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by CarlTrading, 05-11-2026, 05:56 AM
            0 responses
            192 views
            0 likes
            Last Post CarlTrading  
            Working...
            X