PureBytes Links
Trading Reference Links
|
Ace, try this:
==================
RSI New Highs/Lows
==================
---8<--------------------------
{ http://www.metastocktools.com }
{ User inputs }
pds1:=Input("New Hi/Lo lookback periods",1,2600,21);
pds2:=Input("RSI periods",2,260,14);
{ RSI new Highs/Lows }
NuHi:=HHV(RSI(pds2),pds1);
NuLo:=LLV(RSI(pds2),pds1);
{ Plot in own window below price chart }
RSI(pds2);NuHi;NuLo
---8<--------------------------
jose '-)
--- In equismetastock@xxxxxxxxxxxxxxx, "Ace ..." <veerajate@xxxx>
wrote:
>
> Hello Jose :
>
> I follow Your project all most in this group and your website.
> I live in Thailand and grade to know you.
>
> I don't know how to write Mwtastock Formular so please write it to
> me
>
> 1.Symbol Buy : Write New High RSI
> 2.Symbol Sell : Write New Low RSI
>
> See you soon.
> Ace
>
> From: "Jose" <josesilva22@xxxx>
> Reply-To: equismetastock@xxxxxxxxxxxxxxx
> To: equismetastock@xxxxxxxxxxxxxxx
> Subject: [EquisMetaStock Group] Re: Valuewhen()
> Date: Sat, 22 Jan 2005 19:11:57 -0000
>
>
> The short answer is, yes, you can reference any prior condition
> occurrence with the very handy MS ValueWhen() function.
>
> And as Roy has pointed out in a back issue of the MSTT newsletter,
> you can also nest ValueWhen() functions inside each other.
>
> Anyway, try the code below - it doesn't use any forward-referencing
> to determine peaks/troughs.
>
> ---8<--------------------------
>
> { http://www.metastocktools.com }
>
> { User inputs }
> back:=Input("Reference last x Stoch Peak/Trough value",1,100,1);
> pds1:=Input("%k periods",2,260,5);
> pds2:=Input("%k slowing",1,260,3);
>
> { Stochastic }
> St:=Stoch(pds1,pds2);
>
> { Stoch peaks }
> pk:=Ref(St,-1)>St AND Ref(St,-1)>Ref(St,-2);
> >pkVal:=ValueWhen(back,pk,Ref(St,-1));
>
> { Stoch troughs }
> tr:=Ref(St,-1)<St AND Ref(St,-1)<Ref(St,-2);
> trVal:=ValueWhen(back,tr,Ref(St,-1));
>
> { Plot in own window }
> St; { Green }
> pkVal; { Red }
> trVal; { Blue }
>
> ---8<--------------------------
>
>
> jose '-)
> http://www.metastocktools.com
>
>
> --- In equismetastock@xxxxxxxxxxxxxxx, mwtang <mwtang@xxxx> wrote:
> I would appreciate help in using Valuewhen(). For example :
>
> b1 := Ref(Stoch(5 ,3 ),+0) < Ref(Stoch(5 ,3 ),+1) AND Ref(Stoch(5 ,3
> ),+0) < Ref( Stoch(5 ,3 ),-1) ;
>
> ValueWhen(1 ,b1 ,Ref(Stoch(5 ,3 ),+0 )> ValueWhen(2 ,b1 ,
> Ref(Stoch(5 ,3 ),+0);
>
> Could I use more than two valuewhen() i.e
> ValueWhen(3 ,b1 ,Ref(Stoch(5 ,3 ),+0 ) or
> ValueWhen(4 ,b1 ,Ref(Stoch(5 ,3 ),+0 )
> Thank in advance.
> Regards.
> mun wai.
------------------------ Yahoo! Groups Sponsor --------------------~-->
What would our lives be like without music, dance, and theater?
Donate or volunteer in the arts today at Network for Good!
http://us.click.yahoo.com/Tcy2bD/SOnJAA/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/
|