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

Re: [EquisMetaStock Group] EMA - BB volatility adjusted



PureBytes Links

Trading Reference Links

An SMA version would require variable periods in either the Mov(x,
VarPds,S) or Sum(x,VarPds) functions.

I normally use a 22-function multi-purpose MetaStock dll for this, 
VarPeriod.dll, but I'm not sure about the legality of posting it here.
"TNT VarPeriod, Copyright (c) The Nag Tools, 2001  www.tnt-ms.fr.st"
The URL VarPeriod.dll has expired.

Jose '-)

--- In equismetastock@xxxxxxxxxxxxxxx, le corbeaux masque 
<lecorbeauxmasque7@xxxx> wrote:
> jose, would it be possible to also code an SMA version
> (not using the "prev" function,- for those of us using
> it to backtest strategies)....?
> 
> 
> thanks in advance...
> 
> 
> --- Jose <josesilva22@xxxx> wrote:
> > Any feedback on this variable EMA variation
> > appreciated:
> > 
> > ============================
> > EMA - BB volatility adjusted
> > ============================
> > 
> > ---8<-------------------------------
> > 
> > { Bollinger band volatility-adjusted,
> >   dynamic-period EMA v1.0 }
> > 
> > { Positive sensitivity:
> >  EMA periodicity shortens on high BB volatility 
> >  - increases on low BB volatility }
> > { Negative sensitivity:
> >  EMA periodicity shortens on low BB volatility
> >  - increases on high BB volatility }
> > 
> > { [1]EMA:         BB volatility-adjusted EMA }
> > { [2]Dyn periods: EMA periodicity used }
> > { [3]BB vlty:    BB volatility 0~100% }
> > { [4]Signals:     EMA/price crossover signals }
> > 
> > { ©Copyright 2004 Jose Silva }
> > { http://users.bigpond.com/prominex/pegasus.htm }
> > 
> > pds:=Input("EMA avg periods",1,2520,21);
> > sens:=Input("BB volatility sensitivity (+100 to
> > -100)%",-100,100,50)
> > /100;
> > pdsVlty:=Input("BB voltility sampling periods",
> >  2,2520,126);
> > pdsBB:=Input("Bollinger Band periods",
> >  2,2520,10);
> > x:=Input("[1]Open  [2]High  [3]Low  [4]Close  [5]Vol
> >  [6]P",1,6,4);
> > plot:=Input("[1]EMA,  [2]Dyn periods,  [3]BB vlty, 
> > [4]Signals",1,4,1)
> > ;
> > 
> >
> x:=If(x=1,O,If(x=2,H,If(x=3,L,If(x=5,V,If(x=6,P,C)))));
> > y:=(BBandTop(x,pdsBB,S,2)-BBandBot(x,pdsBB,S,2))
> >  /Mov(x,pdsBB,S);
> > BBvlty:=(y-LLV(y,pdsVlty))/(HHV(y,pdsVlty)
> >  -LLV(y,pdsVlty)+.000001);
> > multi:=If(BBvlty<=.5,
> >  10*Power(BBvlty,3.4739)+.1,
> >  10*Power(BBvlty,3.32)+.000001);
> > multi:=If(sens>0,1/multi,multi);
> > multi:=If(multi<1,1-(1-multi)*Abs(sens),
> >  (multi-1)*Abs(sens)+1);
> > pds:=pds*multi;
> > pds:=If(pds>Cum(x<>-101)-(pdsVlty+pdsBB),
> >  Cum(x<>-101)-(pdsVlty+pdsBB),pds);
> > pds:=If(pds<1,1,pds);
> > BBema:=x*2/(pds+1)+PREV*(1-2/(pds+1));
> > signals:=Cross(x,BBema)+-Cross(BBema,x);
> > 
> > If(plot=2,pds,If(plot=3,BBvlty*100,
> >  If(plot=4,signals,BBema)))
> > 
> > ---8<-------------------------------
> > 
> > jose '-)




------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/BefplB/TM
---------------------------------------------------------------------~->

 
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/