PureBytes Links
Trading Reference Links
|
Help,
again, Jose,
I am
traying your solution in the following code:
Y:=Security("IBX",(O+C+L+H)/4);
FV:=ValueWhen(1,Cum(1)=1,Y);
Y;FV
but I get
zero for FV, an incorrect value (actual value shoud be
2258.44).
I am
obviously doing an error, but where?
Thanks
again,
Manuel
----- Original Message -----
Sent: Sunday, March 27, 2005 7:47
PM
Subject: [EquisMetaStock Group] Re: First
value of MS arrays
First value in a data
array:
========== FirstValue ========== ---8<---------------- DataArray:=OPEN; FirstValue:=ValueWhen(1,Cum(1)=1,DataArray);
FirstValue ---8<----------------
Value
of a data array on a given
date:
========= DateValue ========= ---8<----------------
{
Plots Data Array value on given date } { http://www.metastocktools.com
}
{ Date input } StDay:=Input("Day
[1~31]",1,31,1); StMnth:=Input("Month
[1~12]",1,12,1); StYear:=Input("Year
[1800~2200]", 1800,2200,2005);
{ Data Array
} DataArray:=CLOSE;
{ First available Date signal
} binary:=Year()>StYear OR (Year()=StYear AND
(Month()>StMnth OR Month()=StMnth AND
DayOfMonth()>=StDay)); signal:=binary AND Alert(binary=0,2);
{
Data Array value on first available date
} DateValue:=ValueWhen(1,signal,DataArray);
{ Extend DateValue to
whole chart } DateValue:=LastValue(DateValue);
{ Plot DateValue
} DateValue
---8<----------------
jose '-) http://www.metastocktools.com
---
In equismetastock@xxxxxxxxxxxxxxx, "manelcabedo" <manelcabedo@xxxx >
wrote: > > > Hi, > > A question for the
experts: > > Is there any way of knowing the value of the first
element of a MS > array? Or still better: Is it possible to know the
value of a MS > array element for a given date? > > Thanks
in advance. > > Manuel
Yahoo! Groups Sponsor |
ADVERTISEMENT
| |
|
Yahoo! Groups Links
|
|