[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EquisMetaStock Group] Re: trendline angle degree



PureBytes Links

Trading Reference Links

Hi there,

r is the radius, r^2 = x^2 + y^2, or r = sqrt(x^2+y^2).  There are two
ways to work with the dates.  Either in Excel, where you can enter
them and calculate the difference (or, more accurately, the business
days between them) and then you can use MSFL.  If you plot something
like the Cum(1) function, it can serve as the X axis, going from 0 to
where ever.  You can do this in MSFL, and we have had such examples
here with lines and ellipses some time ago.  You can try it, or note
the value of the Cum(1) function at the two points.  This should give
you x0 and x1.  Then note the value of the trendline at these points
and you have y0 and y1.  In excel, calculate

r = sqrt(x0*x0 + y0*y0)

and

angle = asin( (y1-y0) / r )

This gives the angle in radians (I think), so to get to degrees, use
something like

degrees = angle / ( 2 * PI ) * 360

Regards
MG Ferreira
TsaTsa EOD Programmer and trading model builder
http://www.ferra4models.com
http://fun.ferra4models.com 

--- In equismetastock@xxxxxxxxxxxxxxx, "meta" <meta_stock@xxxx> wrote:
> Thanks for the answer, but I had a couple of problem cause of my math
> unknowing.
> I find the date and value you told about, but how can I translate a
date in
> a number to have x0 and y0?
> I tried to write the formula in excel but had the result "NAME#?"
> What is r ?
> Can we try with a simple example?
> setted a line at initial and final value 1000, initial date 1/6/05
and final
> 24/6/05 it should result a angle of 0° if i'm not wrong, can you
translate
> this in an excel formula?
> TIA
> 
> 
> 
> ----- Original Message ----- 
> From: "mgf_za_1999" <no_reply@xxxxxxxxxxxxxxx>
> To: <equismetastock@xxxxxxxxxxxxxxx>
> Sent: Saturday, June 25, 2005 4:04 PM
> Subject: [EquisMetaStock Group] Re: trendline angle degree
> 
> 
> > Hi there,
> >
> > To get the angle is not easy.  If you look at the properties of a
> > line, it gives you the start and end date and value, which you could
> > use as (x0,y0) and (x1,y1) coordinates and from that calculate the
> > angle in something like Excel.  Using something like
> >
> >     angle = asin(y/r) = asin(y/(sqrt(y^2+x^2))
> >
> > may do the trick.
> >
> > Regards
> > MG Ferreira
> > TsaTsa EOD Programmer and trading model builder
> > http://www.ferra4models.com
> > http://fun.ferra4models.com
> >
> >
> > --- In equismetastock@xxxxxxxxxxxxxxx, "meta" <meta_stock@xxxx> wrote:
> > > Hi,
> > > I'm new at the group,
> > > I need a little help
> > > I need a program, a plug-in or a formula for metastock (or
excel) tells
> > > trendline angle degree, +/- as in figure
> > > http://img151.echo.cx/img151/3320/noname0rf.gif
> > > any help?
> > > TIA
> >
> >
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
> >




 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/equismetastock/

<*> To unsubscribe from this group, send an email to:
    equismetastock-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/