PureBytes Links
Trading Reference Links
|
Hi
//scatter is::
// either
scatter = StDev ( Close - Linr, LRper ); // Std deviation from LinReg
// or
scatter = StdErr ( Close , LRper ); // Std deviation from LinReg
/* according to TJ Help:
StdErr Calculates standard error function (standard error of linear
regression estimate) of the ARRAY over periods bars.
These two are not quite equivalent, because Linr is `moving'.
Below is StdErr indicator and a system.
cheers-- alex
*/
//--------------8<--------------------------------------
_SECTION_BEGIN ("KirshBands"); //alex-- mar 5,2006
SetBarsRequired(10000,0);
Per = Param( "per", 22, 2, 50, 1 );
LRper = Param( "LR per", 12, 2, 50, 1 );
Ndev = Param("Ndev", 1.75, 1.25, 3, .25);
EmaP = EMA(Close, per);
//Linr = LinearReg( Close, LRper ); // Lin Reg of Close (not used)
scatter = StdErr ( Close , LRper ); // Std deviation from Lin Reg
Plot(C,"C",1,64);
// Plot Ema w/Kirsh Bands:: kirsh = EMA(per) +(-) Ndev * scatter;
for( i = -1; i <= 1 ; i++)
Plot( EMAP + i * Ndev * scatter, "Kirsh", i + 2, 1);
//trades (adjust rules)::
kirTOP = EMAP + Ndev * scatter;
kirBOT = EMAP - Ndev * scatter;
kirBuy = Cross( C , kirBOT);
kirShort = Cross( kirTOP, C);
PlotShapes(shapeUpArrow*kirBuy + shapeDownTriangle*kirShort,
colorGreen*kirbuy +
colorRed*kirShort, L*kirBuy+H*kirShort);
_SECTION_END();
//--------------8<--------------------------------------
--- In amibroker@xxxxxxxxxxxxxxx, "aequalsz" <aequalsz@xxx> wrote:
>
> Hello,
>
> > scatter = StDev ( Close - Linr, LRper ); // Std deviation from
Lin
>
> should be,
>
> scatter = Stderr ( Close - Linr, LRper );
>
> a=z
>
>
>
>
>
>
>
> --- In amibroker@xxxxxxxxxxxxxxx, "ricko8294_98" <ricko@> wrote:
> >
> > I'm not too expert at coding, but I thought I read somewhere
that the
> > KirshBands were the same as the Standard Error Bands. Look in
the
> > help files under STDERR.
> > Rick
> >
> > --- In amibroker@xxxxxxxxxxxxxxx, "dalengo" <dalengo@> wrote:
> > >
> > > //try this (little typo corrected: use LRper for LinReg).
> > > //cheers-- alex
> > >
> > > _SECTION_BEGIN ("KirshBands"); //alex-- mar 4,2006
> > >
> > > SetBarsRequired(10000,0);
> > > Per = Param( "per", 22, 2, 50, 1 );
> > > LRper = Param( "LR per", 13, 2, 50, 1 );
> > > Ndev = Param("Ndev", 1.75, 1.25, 3, .25);
> > >
> > > EmaP = EMA(Close, per);
> > > Linr = LinearReg( Close, LRper ); // Lin Reg of Close wrt
Selected
> > > scatter = StDev ( Close - Linr, LRper ); // Std deviation from
Lin
> > > Reg
> > >
> > > Plot(C,"C",1,64);
> > >
> > > // Plot Ema w/Kirsh Bands:: kirsh = EMA(per) +(-) Ndev *
scatter;
> > >
> > > for( i = -1; i <= 1 ; i++)
> > > Plot( EMAP + i * Ndev * scatter, "Kirsh", i + 2, 1);
> > > _SECTION_END();
> > >
------------------------ Yahoo! Groups Sponsor --------------------~-->
Try Online Currency Trading with GFT. Free 50K Demo. Trade
24 Hours. Commission-Free.
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~->
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For other support material please check also:
http://www.amibroker.com/support.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/
|