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

RE: [EquisMetaStock Group] Re: Valuewhen()



PureBytes Links

Trading Reference Links


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@xxxxxxxxx>
>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 --------------------~--> 
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/