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

[EquisMetaStock Group] Re: First value of MS arrays



PureBytes Links

Trading Reference Links


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