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

Re: [amibroker] Re: Slope is degrees for EMA34 price line



PureBytes Links

Trading Reference Links

Here's roughly the same version from my indicator window and it works.  Try it,adjust the parameters and it will

display the angle in degrees and radians.  

This is attributed to Dimitris Tsokakis from 2004  

Hope this helps

JOE  

/* Suppose you START 50 bars before the last bar AND the END is 20 bars

ago.

for any ARRAY, the angle is

*/

Start = Param("Starting Bar", 50,10,122,1);

End = Param("Ending Bar",30,10,122,1);

// START=50;END=30;

ARRAY=RSI();

L1=LastValue(Cum(1));

X0=L1-START;X1=L1-END;

Y0=ARRAY[X0];Y1=ARRAY[X1];

Plot(ARRAY,"",1,1);

Plot(LineArray(X0,Y0,X1,Y1),"",4,1);

Plot(LineArray(X0,Y0,X1,Y0),"",4,1);

ANGLE=atan((Y1-Y0)/(X1-X0));

Title="ANGLE="+WriteVal(ANGLE)+" RADS"+", ["+WriteVal(45*ANGLE/atan

(1),1.0)+" DEGS]";

----- Original Message -----
From: Jason Hart
Sent: Wednesday, February 23, 2005 8:06 AM
Subject: Re: [amibroker] Re: Slope is degrees for EMA34 price line

Joe,
 
I plugged in your code from message 77688 and it didn't work, what am I doing wrong.  Here is the code from message 77688
 
Message 77688 of 78582  |  Previous | Next  [ Up Thread ] Message Index
  Msg #
From:  "Joe Landry" <jelandry@xxxx>
Date:  Fri Feb 4, 2005  9:17 pm
Subject:  Re: [amibroker] Convert linregslope into degrees

Hellllloooooo!   Did you see my note?
JOE


Joseph Landry <jelandry@xxxxxxxxxxxxx> wrote:

Please work on those search techniques!
I just searched for < slope > and got twenty hits including the one
I posted at MSG 77688 where you'll find Dimitris' code to calculate
the angle is presented.

JOE
--- In amibroker@xxxxxxxxxxxxxxx, "sinhavishal" <sinhavishal@xxxx>
wrote:
>
> I did search but can't find the code.
> Is this correct as following:
>
> EMA34 = EMA(C,34);
> Slopeindegrees = atan(ROC(EMA34,2)) * 3.1476 * 360;
>
> Thanks
> choco
>
> --- In amibroker@xxxxxxxxxxxxxxx, Graham <kavemanperth@xxxx> wrote:
> > Search on the posts here for the past week or 2
> >
> >
> > On Wed, 23 Feb 2005 09:25:00 -0000, sinhavishal
<sinhavishal@xxxx>
> wrote:
> > >
> > >
> > > has anybody written code to find this in AB?
> > >
> > > Thanks
> > > Vishal
> > >
> > >
> > > Check AmiBroker web page at:
> > > http://www.amibroker.com/
> > >
> > > Check group FAQ at:
> http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> > > Yahoo! Groups Links
> > >
> > >
> > >
> > >
> > >
> >
> >
> > --
> > Cheers
> > Graham
> > http://e-wire.net.au/~eb_kavan/





Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html




Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html




Yahoo! Groups Links