PureBytes Links
Trading Reference Links
|
Hi! Jose,
Thank you for showing me how to program the 4 parameters as user input
variables and also the tips on using the Sum() funstion. They are just
awesome!
Best regards,
ALM
--- In equismetastock@xxxxxxxxxxxxxxx, "Jose Silva" <josesilva22@xxxx>
wrote:
> Alm, you could try adding some user inputs to your indicator, and
> simplifying some of the code with the Sum() MS function:
>
> ---8<-------------------------
>
> { User inputs }
> pds:=Input("Osc trough moving downwards last x periods",1,260,5);
> pr1:=Input("ROC 1, %",0,100,14);
> pr2:=Input("ROC 2, %",0,100,11);
> pds1:=Input("WMA periods",1,260,10);
>
> { Oscillator }
> CP:=Mov(ROC(C,pr1,%)+ROC(C,pr2,%),pds1,W);
>
> { Oscillator currently in negative zone }
> CP<0
>
> { Osc trough }
> { Osc moving upwards on latest bar }
> AND CP>Ref(CP,-1)
>
> {... and moving downwards in last x periods }
> AND Sum(Ref(CP,-1)<Ref(CP,-2),pds)=pds
>
> ---8<-------------------------
>
>
> > {and moving downwards last 6 periods}
>
> Note that your original code looks for a downward movement in only
> the previous five bars.
>
>
> jose '-)
> http://metastocktools.com
>
>
>
> --- In equismetastock@xxxxxxxxxxxxxxx, "awlaimeng"
> <awlaimeng@xxxx> wrote:
> >
> > I have the following oscillator and would like to know whether
> there
> > is a better way of finding the "trough" (valley) when the
> > oscillator moves from the negative zone and starts to move
upwards.
> >
> >
> > {oscillator}
> > CP:=Mov(ROC(C,14,%)+ROC(C,11,%),10,W);
> >
> > {oscillator below zero line - in negative zone}
> > CP<0
> >
> > {finding the trough}
> > {moving upwards on latest period}
> > {and moving downwards last 6 periods}
> > AND CP>Ref(CP,-1) AND
> > Ref(CP,-1)<Ref(CP,-2) AND
> > Ref(CP,-2)<Ref(CP,-3) AND
> > Ref(CP,-3)<Ref(CP,-4) AND
> > Ref(CP,-4)<Ref(CP,-5) AND
> > Ref(CP,-5)<Ref(CP,-6)
> >
> > Any comments on the above codes will be much appreciated.
> >
> > Thank you and best regards,
> > ALM
------------------------ Yahoo! Groups Sponsor --------------------~-->
<font face=arial size=-1><a href="http://us.ard.yahoo.com/SIG=12h9k8eug/M=362131.6882500.7825259.1493532/D=groups/S=1705375617:TM/Y=YAHOO/EXP=1124208775/A=2889190/R=0/SIG=10r90krvo/*http://www.thebeehive.org
">Put more honey in your pocket. (money matters made easy) Welcome to the Sweet Life - brought to you by One Economy</a>.</font>
--------------------------------------------------------------------~->
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/
|