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

[EquisMetaStock Group] Re: a new volume-adjusted MA



PureBytes Links

Trading Reference Links


Interesting indeed...  I'm tempted to keep this one to myself.

=============================
EMA - Volume adaptable Mk III
=============================
---8<------------------------

{ Volume adaptable EMA v3.0 }
{ EMA samples bars with above/below-avg Volume }
{ ©Copyright 2004 Jose Silva }
{ For personal use only }
{ http://users.bigpond.com/prominex/pegasus.htm#metastock }

{ User inputs }
pds:=Input("EMA periods",2,2520,21);
x:=Input("use Open=1 High=2 Low=3 Close=4 WClose=5 P=6",1,6,4);
shift:=Input("EMA vertical shift %",
 -100,100,0)/100+1;
plot:=Input("[1]HiEMA, [2]LoEMA, [3]Both,[4]Diff, [5]Signals",1,5,3);

{ Select price field }
x:=If(x=1,O,If(x=2,H,If(x=3,L,If(x=5,WC(),If(x=6,P,C)))));

{ Above/Below average Volume points }
HiVol:=V>Mov(V,pds,E);
LoVol:=V<Mov(V,pds,E);

{ Select above/below-avg bars for EMA }
xHiVol:=ValueWhen(1,HiVol,x);
xLoVol:=ValueWhen(1,LoVol,x);

{ EMAs }
EmaHiVol:=Mov(xHiVol,pds,E);
EmaHiVol:=EmaHiVol*shift;
EmaLoVol:=Mov(xLoVol,pds,E);
EmaLoVol:=EmaLoVol*shift;

{ EMA +/- difference }
diff:=EmaHiVol-EmaLoVol;

{ EMA +/- difference crossover signals }
signals:=Cross(diff,0)-Cross(0,diff);

{ Plot on price chart }
If(plot=1,EmaHiVol,If(plot=2,EmaLoVol,
 If(plot=3,EmaLoVol,If(plot=4,0,0))));
If(plot=1,EmaHiVol,If(plot=2,EmaLoVol,
 If(plot=3,EmaHiVol,If(plot=4,diff,signals))))

---8<------------------------

jose '-)



--- In equismetastock@xxxxxxxxxxxxxxx, Code 2 <Code2@xxxx> wrote:
> Nice idea.
> 
> You are analyzing the effect on price of high volume days (or
> whatever the periodicity).  Equally telling is what happens to price
> on low-volume days.  Typically, a stock will rise on higher volume
> and drift lower on low volume, but not always.  Perhaps it would be
> useful to compare high-volume average price to low-volume average
> price.
> 
> Another variation would be to examine the spread between the
> high-volume and low-volume averages.  Yet another variation would be
> to plot the spread between the high-volume EMA and standard EMA, as
> well the spread between the low-volume EMA and standard EMA.
> If the moving averages are responsive enough, they might be able to
> highlight fundamental shifts.  A kind of Ease of Movement indicator.
> 
> Interesting stuff.
> 
> 
> 
> From: Jose <josesilva22@xxxx>
> To: equismetastock@xxxxxxxxxxxxxxx
> Date: Tuesday, December 14, 2004, 2:35:35 PM
> Subject: [EquisMetaStock Group] Re: a new volume-adjusted MA
> 
> Ok, this is what I have so far:
> 
> ======================
> EMA - Volume adaptable
> ======================
> ---8<-----------------
> 
> { Volume adaptable EMA v1.0 }
> { EMA samples bars with above-avg Volume }
> { ©Copyright 2004 Jose Silva }
> { For personal use only }
> { http://users.bigpond.com/prominex/pegasus.htm#metastock }
> 
> { User inputs }
> pds:=Input("EMA periods",1,2520,21);
> x:=Input("use Open=1 High=2 Low=3 Close=4 WClose=5 P=6",1,6,4);
> shift:=Input("EMA vertical shift %",
>  -100,100,0)/100+1;
> plot:=Input("[1]EMA,  [2]Data,  [3]Sampling bars, [4]Crossovers",1,
> 4,1);
> 
> { Select price field }
> x:=If(x=1,O,If(x=2,H,If(x=3,L,If(x=5,WC(),If(x=6,P,C)))));
> 
> { Above average Volume points }
> VolAvgPlus:=V>Mov(V,pds,E);
> 
> { Select above-avg bars for EMA }
> x:=ValueWhen(1,VolAvgPlus,x);
> 
> { Reduce periodicity on low bar count }
> pds:=If(pds>Cum(IsDefined(x)),
>  Cum(IsDefined(x)),pds);
> 
> { EMA }
> Ema:=x*2/(pds+1)+PREV*(1-2/(pds+1));
> Ema:=Ema*shift;
> 
> { Crossover signals }
> signals:=Cross(x,Ema)-Cross(Ema,x);
> 
> { Plot on price chart }
> If(plot=1,Ema,If(plot=2,x,
>  If(plot=3,VolAvgPlus,signals)))
> 
> ---8<-----------------
> 
> jose '-)
> 
> 
> 
> --- In equismetastock@xxxxxxxxxxxxxxx, "Jose" <josesilva22@xxxx> 
> wrote:
> 
> This excellent post has given me an idea for coding a unique Moving 
> Avg:
> http://finance.groups.yahoo.com/group/equismetastock/message/15254
> 
> How about a MA that only considers data on those days when the
> volume is x-periods above the average?
> Any further ideas/suggestions before I begin coding it?
> 
> jose '-)





------------------------ Yahoo! Groups Sponsor --------------------~--> 
$4.98 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/Q7_YsB/neXJAA/yQLSAA/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/