PureBytes Links
Trading Reference Links
|
Check if it is right,
I am going sleeping now
range=50;
sMA=MA(Close,range);
Boli=0;
std=0;
for( i = range ; i < BarCount; i++ )
{
local SumRes,SumDev;
SumRes=0;
SumDev=0;
for(j=0;j<range;j++)
{
SumRes = C[i-j] + SumRes ;
}
mean[i]= SumRes/range ;
for(j=0;j<range;j++)
{
SumDev=((mean[i]-C[i-j])^2)+ SumDev ;
}
std[i]=sqrt(SumDev/range) ;
Boli[i]=mean[i]-std[i]*1.25;
if(C[i]>boli[i])
range=range-1;
else
{
range=50;
}
}
Plot(C,"",1,64);
Plot(Boli,"CCIx",colorGreen,styleLine);
Plot(MA(Close,49) - StDev(Close,49) * 1.25 ,"",colorRed,1);
> Check the posts for past couple of weeks for similar thing
>
>
> On Thu, 3 Mar 2005 23:10:00 +1100, John Simovic <jsimovic@xxxx>
wrote:
> >
> > I have the following code below and I would like to reduce the MA
in the
> > variable dnband and by 1 for each day I do not get stopped.
Anybody know how
> > to achieve this goal?
> >
> > dnBand = MA(Close,50) - StDev(Close,50) * 1.25;
> >
> > so that if I wasn't stopped after the first day
> >
> > dnband = MA(Close,49) - StDev(Close,49) * 1.25 and so on and so
on.
> > Any ideas?
> >
> >
> > 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/
------------------------ 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/
|