Announcement

Collapse
No announcement yet.

need simple help in creating Relative slope indicator for Exponential moving average

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

  • need simple help in creating Relative slope indicator for Exponential moving average

    I read this indicator description and wondering if someone can help with this simple indicator.

    X = EMA ( (H + L + C) /3 )

    Y = 2 * ( (X - X(-1)) / (X + X(-1))

    Relative Slope = 100 * EMA ( Y ) smoothed with period 3


    Authored by Dimitris Tsokakis, the relative slope takes an exponential moving average of typical price (HLC/3), commonly a 20 period EMA but the period is customizable. It then takes the resulting values, and for each value, the previous value is subtracted and the result is divided by the sum of the two values. These results are then further smoothod with a 3 period EMA

    Here is a link from investor RT with further explanantion



    Any help will be appreciated. I am not a programmer so i have little knowledge on how to program this simple indicator. i guess most of you guys can whip this in about 2 minutes.

    Any help will be appreciated.

    Thanks

    Jacob
    Attached Files

  • #2
    Hi Jacob,

    I took a cut at coding this indicator. Here is a screenshot.



    I put a copy in my Fileshare and also attached a copy to the post below.

    I put a couple of links in the efs text as well. There are many examples in the fileshare at these links, in addition to one recently coded by JasonK from the same author.

    I hope this helps.
    Attached Files

    Comment


    • #3
      THANK YOU SO MUCH
      navyseal

      Comment


      • #4
        You are most welcome.

        For clarity, the link I mentioned to the efs recently coded by JasonK is contained in a comment line within the efs.

        Comment


        • #5
          stevehare2003

          I also thank you for this indicator.. One thought, how would I modify this code so that it would tell me not the relative slope, but the Degrees of the angle?

          I read a post that discuss Esignal has the ability to do this by:

          "Standard slope is simply rise over run. 

Converting an angle to percentage terms is:


          nSlopePct = Math.tan( nAngle * (Math.PI/180) );



          where nAngle is the angle in degrees of the line in question.



          Use the Math.atan() function to accomplish this.

          

If you have a 30% slope, to convert that to degrees you would divide the arctangent of 0.30 by Pi /180.

          In EFS you could do it this way:



          var nSlope = 0.30; //30% slope

nAngle = Math.atan( nSlope ) / (Math.PI/180);



          nAngle now equals 16.6992442 degrees.
"

          Hoping to get some assistance with coding this from you since you programmed it originally.

          Comment

          Working...
          X