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

angle of indicaor

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

    angle of indicaor

    I've posted about this before (sorry). I'm trying
    to determine the angle in degrees of an indicator.
    Then to color code the price bars according to
    3 or 5 different angles.

    This is just the basic indicator. Values not important now.

    Plot0.Set(SMA(VMA(Close, 4,2),3)[0]);

    I *think* it applies a 3 period SMA onto a 4 period
    VMA with a volatility of 2?

    I'm going to look here:



    and here some more. If I find anything that I can comprehend
    I will re-post:



    (I did try to download MaSlopeBox last week several times. I
    couldn't get it to go where it should, or work. That was most likely
    my fault.)

    -Stephen

    #2
    The slope thread you linked to is the most conclusive thread on this forum about slope calculations. If I remember correctly maybe in the earlier pages there were equations being thrown around. You may want to concentrate your efforts there.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      The line:

      RadToDegrees*(Math.Atan etc. etc. etc.

      got my attention (by dwalls). Also

      (System.Math.Atan(Slope(SMA(5),CurrentBar-1,CurrentBar))*180/Math.PI).ToString()

      by you. Not sure what this is all about however or how to apply it.

      Comment


        #4
        These are basically mathematical formulas that you can set variables or set plot values to.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by Josh View Post
          These are basically mathematical formulas that you can set variables or set plot values to.
          Where do I find info on Math.Atan if you think I really need it?
          Where do I find info on 180/Math.PI if you think I really need it?

          I'm not sure what I even need to do this problem regarding what
          code is necessary, but the two above at least might be needed.

          Thanks,

          -Stephen

          Comment


            #6
            The easiest way to get the slope of an indicator is to create a strategy using the wizard and use the MASlopePlot indicator created by Gumphrie and set the InputSeries as whatever indicator you want and set the 'Plot on Chart' parameter to true. You can leave the 'Do the Following' section blank if you wish.

            If I'm not mistaken, NT7 will allow indicator on indicator so this cumbersome process will be seamless in the future...

            Comment


              #7
              Originally posted by Elliott Wave View Post
              The easiest way to get the slope of an indicator is to create a strategy using the wizard and use the MASlopePlot indicator created by Gumphrie and set the InputSeries as whatever indicator you want and set the 'Plot on Chart' parameter to true. You can leave the 'Do the Following' section blank if you wish.

              If I'm not mistaken, NT7 will allow indicator on indicator so this cumbersome process will be seamless in the future...
              Thanks. I actually just did it! I didn't know I had to:

              File | Utilities | Import NinjaScript

              I thought extracting it was enough. I will get back if I can or can not
              do something with this today.

              -Stephen

              Comment


                #8
                Ok, the VMA in NT requires 2 inputs. I don't see that available in
                MASlopePlot. I also will have to do post smoothing of the indicator
                and possibly pre smoothing of the data for the indicator. Someone
                had this basic question a while back. I'll contact him, but of course
                you can continue here if you really want.

                -Stephen

                Comment


                  #9
                  Originally posted by stephenszpak View Post
                  Ok, the VMA in NT requires 2 inputs. I don't see that available in
                  MASlopePlot. I also will have to do post smoothing of the indicator
                  and possibly pre smoothing of the data for the indicator. Someone
                  had this basic question a while back. I'll contact him, but of course
                  you can continue here if you really want.

                  -Stephen
                  I contributed a little bit to this indicator, so hopefully I can shed some light on it....

                  Although the VMA requires 2 parameters, by default they are the same value, so the 'Period' value is also used for the volatility period.
                  Code:
                  case SlopePlotAverageType.VMA:
                                      maSeries.Set(VMA(Period, Period)[0]);
                                      break;
                  Similarly, KAMA also has more than one parameter, but I simply used the default ratio between the parameter values.

                  Code:
                  case SlopePlotAverageType.KAMA:
                                      maSeries.Set(KAMA(Period / 5,Period, Period * 3)[0]);
                                      break;
                  The reason for this was to try to keep the indicator as simple as possible and not have to have a bunch of parameters that only apply to a single moving average type.

                  I think I made a couple tweaks to this indicator and haven't reposted it. When I do I'll probably add support for pre-smoothing because I think its a good idea.
                  Last edited by Elliott Wave; 06-08-2008, 03:00 PM.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by algospoke, Today, 06:40 PM
                  0 responses
                  2 views
                  0 likes
                  Last Post algospoke  
                  Started by maybeimnotrader, Today, 05:46 PM
                  0 responses
                  6 views
                  0 likes
                  Last Post maybeimnotrader  
                  Started by quantismo, Today, 05:13 PM
                  0 responses
                  6 views
                  0 likes
                  Last Post quantismo  
                  Started by AttiM, 02-14-2024, 05:20 PM
                  8 responses
                  168 views
                  0 likes
                  Last Post jeronymite  
                  Started by cre8able, Today, 04:22 PM
                  0 responses
                  8 views
                  0 likes
                  Last Post cre8able  
                  Working...
                  X