PureBytes Links
Trading Reference Links
|
Hello Tim
Here is a formula provided to me by that super MS formula man,
Jose Silva. It's called .... SLOPE.
It provides the average slope of a line over a
user-definable number of periods. Right now it is configured to provide the
slope of a 21-period simple moving average of the close over the past 10
periods. It also specifies whether the line is sloping up or down. To
change the number of periods you want SLOPE to look back at, change the last
number in the second line of this formula - for example, to look back at the
last 20 periods of this same MA 21, your second line would look like this -
smooth:=Input("Smoothing
periods",1,252,20);
To change the type of MA you are analyzing, simply change the
material to the right of the 'x:=' in the first line of this formula.
To analyze the slope of any other type of indicator, simply replace
the material to the right of the x:= with the appropriate formula - for
example, if you wanted to look at the slope of an rsi(14), the first line would
look like this -
x:=rsi(14)
You would then specify, in the second line, how many periods you
wanted SLOPE to look back at when calculating the slope of your rsi line.
Cut and paste this entire formula directly into a "New Indicator'. When you
go to plot this indicator, a box will pop up with 4 user programmable fields.
Just leave everything the way it is for now - it is set to describe the angle of
your line in terms of
-90 degrees to + 90 degrees. If you need further help figuring out
what the other fields are for, let me know.
If you need any custom indicators written, Jose is definitely
your man. I am not associated with him or his business in any way - I just know
he is a genius with this stuff.
Hope this helps. All the best, Nikku
<FONT
size=2>________________________________________________________________________________________________
{Indicator/Oscillator Slope
v2.0 -100~+100% / -90~+90 degrees}©Copyright 2003 Jose
Silva
<FONT
size=3>___________________________________________________________________________
x:=Mov(c,21,s);
smooth:=Input("Smoothing
periods",1,252,10);plot:=Input("plot: underlying indicator=1,
Slope=2",1,2,2);y:=Input("Range adjustor
(0.1~100)",0.1,100,5);display:=Input("display -100~100%=1,
-90~90 degrees=2",1,2,2);
<FONT
size=2>LRlast:=x;LRS:=x-Ref(x,-1);LRprev:=LRlast-LRS;
<FONT
size=2>a:=Min(LRlast,LRprev)/Max(LRlast,LRprev);LRratio:=(If(LRlast>LRprev,2-a,a)-1)*y;LRSdeg:=If(LRratio<0,Atan(LRratio,1)-360, Atan(LRratio,1));LRSper:=LRSdeg*10/9;LRStrue:=If(display=2,LRSdeg,LRSper);
{smoothing alternative
1}LRStrue:=If(smooth=1,LRStrue, Mov(LRStrue,smooth,E));
{smoothing alternative
2}{LRStrue:=If(smooth=1,LRStrue, LinRegSlope(LRStrue,smooth));}
If(plot=1,x,LRStrue)
<BLOCKQUOTE
><FONT
size=2>
Yahoo! Groups Sponsor
ADVERTISEMENT
To unsubscribe from this group, send an email to:
equismetastock-unsubscribe@xxxxxxxxxxxxxxx
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
|