PureBytes Links
Trading Reference Links
|
Thanks, I'll give it a go.
-----Original Message-----
From: equismetastock@xxxxxxxxxxxxxxx
[mailto:equismetastock@xxxxxxxxxxxxxxx]On Behalf Of Jose Silva
Sent: Monday, April 23, 2007 11:01 AM
To: equismetastock@xxxxxxxxxxxxxxx
Subject: [EquisMetaStock Group] Re: Simple Formula Issue with Date
Disposable12, try something like this:
---8<------------------------------------
{ Security reference }
x:=Security("C:\MetaStock Data\#N-Z\NEM",C);
{ User inputs }
Day:=Input("signal Day",1,31,1);
Mnth:=Input("signal Month",1,12,1);
Yr:=Input("signal Year",1800,2200,2007);
plot:=Input("plot: [1]Value, [2]Date signal",1,2,1);
{ Date signal }
signal:=Year()>Yr
OR (Year()=Yr AND (Month()>Mnth
OR Month()=Mnth AND DayOfMonth()>=Day));
signal:=signal AND Alert(signal=0,2);
{ Referenced security's Close on chosen date }
value:=ValueWhen(1,signal,x);
{ Plot in own window }
If(plot=1,value,signal)
---8<------------------------------------
jose '-)
http://www.metastocktools.com
--- In equismetastock@xxxxxxxxxxxxxxx,
"investpostsstill" <disposable12@xxx> wrote:
>
> I've never really tried to use a date in a metastock formula before.
>
> What I would like to do is to reference a particular day in a formula
> to get the closing value on that day.
>
> Lets say I keep NEM at this location: Security("C:\MetaStock
> Data\#N-Z\NEM",C. How can I reference the closing value of NEM on
> 01/01/07?
>
> Maybe a "value When" formula? But I've really no clue. Any help
> would be appreciated. I'm sure this is very simple but never having
> done it.....well, you know the story.
[Non-text portions of this message have been removed]
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/equismetastock/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/equismetastock/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:equismetastock-digest@xxxxxxxxxxxxxxx
mailto:equismetastock-fullfeatured@xxxxxxxxxxxxxxx
<*> 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/
|