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

[EquisMetaStock Group] Re: Explorer



PureBytes Links

Trading Reference Links

MetaStock Explorations can't accept user inputs.
Try this:


Column A: Signals
---8<------------------------------------

{ Variables }
thr:=1.5; {Divergence strength threshold %}
pds:=20;  {Divergence periods}

{ Indicators }
ds:=LinRegSlope(LinRegSlope(C,pds),3);
dsEma:=Mov(ds,pds,E);
PrcEma:=Mov(C,pds,E);

{ Divergences }
Bull:=If(ds>dsEma
   AND ds>Ref(ds,-pds)
   AND C<PrcEma
   AND C<Ref(C,-pds),
   Mov(ds,pds,S)/Mov(ds,100,S),0)
  >thr;
Bear:=If(ds<dsEma
   AND ds<Ref(ds,-pds)
   AND C>PrcEma
   AND C>Ref(C,-pds),
   Mov(ds,pds,S)/Mov(ds,100,S),0)
  >thr;

{ Signals }
If(bull=1,bull,If(bear=1,-bear,0))

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


======
Filter
======
ColA<>0



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




--- In equismetastock@xxxxxxxxxxxxxxx, Paolo <italoarg76@xxx> wrote:
>
> Ciao!!
>        I've seen many times something like this:
> LinRegSlope( LinRegSlope(C,20),3); {DLRS for me}
> 
> That's good to see divergences with close price so I've used a
> modified (by Jose Silva) indicator to find the divergences.
> I was interested to make an EXPLORER from the code but I tryied
> and I failed!
> Some help will be appreciated!! :)
> 
> The indicator code is:
> 
> { DLRP-DIV:
>   Attempt at finding divergences DLRS and Price }
> 
> { User inputs }
> thr:=Input("Divergence strength threshold %",0,100,1.5);
> pds:=Input("Divergence periods",1,260,20);
> 
> ds:= LinRegSlope( LinRegSlope(C,20),3);
> 
> dsEma:=Mov(ds,pds,E);
> PrcEma:=Mov(C,pds,E);
> 
> 
> { Divergences }
> Bull:=If(ds>dsEma
>   AND ds>Ref(ds,-pds)
>   AND C<PrcEma
>   AND C<Ref(C,-pds),
>   Mov(ds,pds,S)/Mov(ds,100,S),0)
>  >thr;
> Bear:=If(ds<dsEma
>   AND ds<Ref(ds,-pds)
>   AND C>PrcEma
>   AND C>Ref(C,-pds),
>   Mov(ds,pds,S)/Mov(ds,100,S),0)
>  >thr;
> 
> { Plot signals }
> If(bull=1,bull,If(bear=1,-bear,0));
> 
> { Jose Silva's aid was used }








------------------------ Yahoo! Groups Sponsor --------------------~--> 
You can search right from your browser? It's easy and it's free.  See how.
http://us.click.yahoo.com/_7bhrC/NGxNAA/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/