Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.

    BertrandNinjaTrader Customer Service

    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.
        BertrandNinjaTrader Customer Service

        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];
            BertrandNinjaTrader Customer Service

            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 RookieTrader, Today, 09:37 AM
                3 responses
                15 views
                0 likes
                Last Post NinjaTrader_ChelseaB  
                Started by kulwinder73, Today, 10:31 AM
                0 responses
                7 views
                0 likes
                Last Post kulwinder73  
                Started by terofs, Yesterday, 04:18 PM
                1 response
                24 views
                0 likes
                Last Post terofs
                by terofs
                 
                Started by CommonWhale, Today, 09:55 AM
                1 response
                4 views
                0 likes
                Last Post NinjaTrader_Erick  
                Started by Gerik, Today, 09:40 AM
                2 responses
                7 views
                0 likes
                Last Post Gerik
                by Gerik
                 
                Working...
                X