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

[EquisMetaStock Group] Re: Tom Demark's 1



PureBytes Links

Trading Reference Links


Try this:

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

i:=Input("Lookback periods",1,260,3);
pds:=Input("SMA periods",1,2600,21);

Hi:=HHV(H,i);
Lo:=LLV(L,i);

DeMax:=If(Hi>Ref(Hi,-1),Hi-Ref(Hi,-1),0);
DeMin:=If(Lo<Ref(Lo,-1),Ref(Lo,-1)-Lo,0);
den:=Mov(DeMax,pds,S)+Mov(DeMin,pds,S);
den:=If(den=0,.000001,den);
DMark:=Mov(DeMax,pds,S)/den*100;
avg:=Cum(DMark)/Cum(IsDefined(DMark));

avg;DMark

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


jose '-)
http://www.metastocktools.com



--- In equismetastock@xxxxxxxxxxxxxxx, "kalkul17" <hern@xxxx> wrote:
> 
> 
> Hi allI am new to Metastock and this forum as well but the tech guys
> at Metastock referred me there to find the answer to this question.
> I have the syntax for the Demarker 1 but it doesn't match up with
> Metastock.  Can anyone give me the Metastock for the Demarker 1 or
> maybe convert this formula for me?
> 
> TIA
> 
> Formula;
> 
> Calculation:
> 
> The value of the DeMarker for the "i" interval is calculated as
> follows:
> 
>     *
> 
>       The DeMax(i) is calculated:
>       If high(i) > high(i-1) , then DeMax(i) = high(i)-high(i-1),
> otherwise DeMax(i) = 0
>     *
> 
>       The DeMin(i) is calculated:
>       If low(i) < low(i-1), then DeMin(i) = low(i-1)-low(i),
> otherwise DeMin(i) = 0
>     *
> 
>       The value of the DeMarker is calculated as:
>       DMark(i) = SMA(DeMax, N)/(SMA(DeMax, N)+SMA(DeMin, N))
> 
> Where:
> SMA — Simple Moving Average;
> N — the number of periods used in the calculation.





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Has someone you know been affected by illness or disease?
Network for Good is THE place to support health awareness efforts!
http://us.click.yahoo.com/Rcy2bD/UOnJAA/cosFAA/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/