• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

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:

    http://search.msdn.microsoft.com/Def...us&refinement=

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

    http://www.ninjatrader-support.com/v...?t=2660&page=6

    (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 saltminer, Today, 05:49 PM
                  0 responses
                  7 views
                  0 likes
                  Last Post saltminer  
                  Started by brunoviveiros, Today, 05:32 PM
                  0 responses
                  4 views
                  0 likes
                  Last Post brunoviveiros  
                  Started by shodson, Today, 05:00 PM
                  0 responses
                  2 views
                  0 likes
                  Last Post shodson
                  by shodson
                   
                  Started by concept, Today, 03:22 PM
                  1 response
                  12 views
                  0 likes
                  Last Post NinjaTrader_Tyler  
                  Started by baluga123, 04-03-2020, 08:19 AM
                  6 responses
                  72 views
                  0 likes
                  Last Post koganam
                  by koganam
                   
                  Working...
                  X