Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Error getting indicator value...

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

    Error getting indicator value...

    Hi,
    I'm trying to get value of SlopeSimple indicator, which is custom indicator and not part of NT. It takes four arguments - SlopeSimple(false,false,period,type)...:

    double maSlope = SlopeSimple(false,false,35,SMA)[0];

    I'm getting CS1502 and CS1503 errors and cannot figure out why.

    And I'm getting CS0021 in this case:

    double maSlope =Slope(SMA(35), 9, 0)[0];

    Please help. Thank you very much,
    Regards,
    Art.
    Last edited by Art09; 11-28-2010, 01:07 PM.

    #2
    Art, you will need to use Intellisense to show you the way for which parameters are expected in the overload, I believe the SMA is a type, like SlopeType.SMA for example.

    Comment


      #3
      Thank you Bertrand. I followed the Method Description and Signatures instruction but still cannot get the value of indicator or method. I expected this would autocomplete but all it completes is word SlopeSimple or Slope in case of using Ninja built in Slope(). Then what to do? I see the description and seems I'm using correct parameters... Here's the description I see:
      Indicator.SlopeSimple(bool DisplayRadians, bool intervalBased, int Period, SlopeType slopeType).

      double maSlope = SlopeSimple(false,false,35,SMA)[0]; -- Where's the error please?

      Thank you.

      Comment


        #4
        The SMA you entered seems incorrect to me, please note the overload this is a type.

        Comment


          #5
          Any idea what to enter for type please? If not then what about this:

          double maSlope =Slope(SMA(35), 9, 0)[0]; - getting CS0021 in this case.

          How to deal with this error?
          Thank you.

          Comment


            #6
            Please try double maSlope = Slope(SMA(35), 9, 0);

            or double maSlope = SlopeSimple(false, false, 35, SlopeType.SMA)[0];

            Comment


              #7
              want to enlarge font size on MASlopeBoxMulti - does anyone know where it is in that script?

              Comment


                #8
                MASlopeBoxMulti indicator

                Originally posted by RicRules View Post
                want to enlarge font size on MASlopeBoxMulti - does anyone know where it is in that script?
                //the bounds offset is multipled by the box number to properly position new instances of the SlopeBox
                graphics.DrawRectangle(new Pen(Plots[0].Pen.Color, 2), bounds.X + bounds.Width - 60, bounds.Y + bounds.Height - Boxnumber * 40, 46, 22);
                StringBuilder strDegrees = new StringBuilder();
                strDegrees.Append((degrees).ToString());
                strDegrees.Append(Convert.ToChar(0176));
                textBrush.Color=degreesColor;
                graphics.DrawString(strDegrees.ToString(), textFont, textBrush, bounds.X + bounds.Width - 60, bounds.Y + bounds.Height - Boxnumber * 40, stringFormat);
                //graphics.DrawString(MySlopeType.ToString(), textFont, textBrush, bounds.X + bounds.Width - 31, bounds.Y + bounds.Height - 40, stringFormat);

                Comment

                Latest Posts

                Collapse

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