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 sjsj2732, Yesterday, 04:31 AM
                0 responses
                24 views
                0 likes
                Last Post sjsj2732  
                Started by NullPointStrategies, 03-13-2026, 05:17 AM
                0 responses
                282 views
                0 likes
                Last Post NullPointStrategies  
                Started by argusthome, 03-08-2026, 10:06 AM
                0 responses
                280 views
                0 likes
                Last Post argusthome  
                Started by NabilKhattabi, 03-06-2026, 11:18 AM
                0 responses
                131 views
                1 like
                Last Post NabilKhattabi  
                Started by Deep42, 03-06-2026, 12:28 AM
                0 responses
                90 views
                0 likes
                Last Post Deep42
                by Deep42
                 
                Working...
                X