PureBytes Links
Trading Reference Links
|
This indicator should work.
Perform a linear regression slope, you can tune 4 (recommended
minimum) to your own taste.
LRS = LinRegSlope(EMA(C, 34), 4);
Graph0 = atan(LRS)*45/atan(1);
I did some simple CCI zero-line reject optimization with an EMA slope
filter on 1 min ES. I used a fixed stop and fixed target, and also
optimized values. I optimized the buy threshold crossing, EMA period
and slope angle too. Doesnt give promising results. Anyone tried and
found anything different?
Regards,
Steven.
--- In amibroker@xxxxxxxxxxxxxxx, "sinhavishal" <sinhavishal@xxxx> wrote:
>
> Hi,
> I was searching in the archive earlier. Ifyou search first time it
> does not come with any esults as it only searches in the last message.
> If you search second time then only it brings the results. Thats yahoo
> anyway.
>
> Thanks for your code for the slope i ndegrees.
> I tried it for EMA34 period for the slope in degrees for the last two
> periods and it brings a value of .7316 and is constant throughout the
> daily chart. It seems to be incorrect. I have codes it like this based
> on yhe formula you have provied:
>
> ===========
> ARRAY=EMA(C,34);
> L1=LastValue(Cum(1));
> X0=L1-2;
> X1=L1-1;
> Y0=ARRAY[X0];
> Y1=ARRAY[X1];
> ANGLE=atan((Y1-Y0)/(X1-X0))*45/atan(1);
>
> ==============
>
> Please let me know where I am doing wrong.
>
> Thanks
> Choco
>
> --- In amibroker@xxxxxxxxxxxxxxx, "Joe Landry" <jelandry@xxxx> wrote:
> > 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
> > To: amibroker@xxxxxxxxxxxxxxx
> > 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@xxxx> 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
> >
> >
> >
> >
> >
> >
>
------------------------------------------------------------------------------
> > Yahoo! Groups Links
> >
> > a.. To visit your group on the web, go to:
> > http://groups.yahoo.com/group/amibroker/
> >
> > b.. To unsubscribe from this group, send an email to:
> > amibroker-unsubscribe@xxxxxxxxxxxxxxx
> >
> > c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service.
------------------------ Yahoo! Groups Sponsor --------------------~-->
What would our lives be like without music, dance, and theater?
Donate or volunteer in the arts today at Network for Good!
http://us.click.yahoo.com/Tcy2bD/SOnJAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~->
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
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|