PureBytes Links
Trading Reference Links
|
Thank you very much ! Jose. I will try the code but most important , I have
to understand the code.Jose , you have teach me a lots. Thanks again.
mun wai.
----- Original Message -----
From: "Jose Silva" <josesilva22@xxxxxxxxx>
To: <equismetastock@xxxxxxxxxxxxxxx>
Sent: Sunday, December 04, 2005 8:54 PM
Subject: [EquisMetaStock Group] Re: Is there a way to display date in
explorer report ?
Mun Wai, the exploration date formula requires distinct binary (0/1)
signals for it to return a dates. It will always return the date for
the latest non-zero values, so it must only be used with binary
signals.
Try this:
===========================
dd/mm/yy of year's High/Low
===========================
---8<------------------------
{ Start of year }
init:=Cum(1)=2;
nuYear:=Year()<>Ref(Year(),-1) OR init;
{ High signals of year }
YearHi:=H=HighestSince(1,nuYear,H);
{ Last High of current year signal }
event:=YearHi;
{ dd/mm/yy of last High of year's signal }
y:=ValueWhen(1,event,Year());
y:=If(y<2000,y-1900,y-2000);
m:=ValueWhen(1,event,Month())*100;
d:=ValueWhen(1,event,DayOfMonth())*10000;
dateHi:=y+m+d;
{ Low signals of year }
YearLo:=L=LowestSince(1,nuYear,L);
{ Last Low of current year signal }
event:=YearLo;
{ dd/mm/yy of last Low of year's signal }
y:=ValueWhen(1,event,Year());
y:=If(y<2000,y-1900,y-2000);
m:=ValueWhen(1,event,Month())*100;
d:=ValueWhen(1,event,DayOfMonth())*10000;
dateLo:=y+m+d;
{ Ouput }
dateHi;
{dateLo}
---8<------------------------
jose '-)
http://www.metastocktools.com
--- In equismetastock@xxxxxxxxxxxxxxx, wai <mwtang@xxxx> wrote:
>
> Hi ! Jose, sorry to have trouble you again. I have try to combine
> this code together with " Yearly High & Low v2.0" to see whether it
> can display date for year high & low in explorer report or not .
> The code is as below :
>
> Low date :
> colc :
> { Yearly High & Low v2.0
>
> ©Copyright 2005 Jose Silva.
> The grant of this license is for personal use
> only - no resale or repackaging allowed.
> All code remains the property of Jose Silva.
> http://www.metastocktools.com }
>
> yr:=2004;
> yrNr:=1;
> plot:=1;
>
> { Start of year }
> init:=Cum(1)=2;
> nuYear:=Year()<>Ref(Year(),-1) OR init;
>
> { Highest/Lowest of year }
> YearHi:=HighestSince(1,nuYear,H);
> YearLo:=LowestSince(1,nuYear,L);
>
> { Restrict High to selected year }
> xYrHi:=If(Year()=yr,YearHi,0);
> xYrHi:=If(Year()>=yr,xYrHi,C);
> xYrHi:=ValueWhen(1,xYrHi>0,xYrHi);
>
> { Restrict Low to selected year }
> xYrLo:=If(Year()=yr,YearLo,0);
> xYrLo:=If(Year()>=yr,xYrLo,C);
> xYrLo:=ValueWhen(1,xYrLo>0,xYrLo);
>
> { Select: individual year's Hi/Lo or all years }
> pYrHi:=If(yrNr=1,xYrHi,YearHi);
> pYrLo:=If(yrNr=1,xYrLo,YearLo);
>
> event:=If(plot=1,pYrLo,nuYear);
>
> y:=ValueWhen(1,event,Year());
> y:=If(y<2000,y-1900,y-2000);
> m:=ValueWhen(1,event,Month())*100;
> d:=ValueWhen(1,event,DayOfMonth())*10000;
>
> y+m+d
>
> But the report only give today date. What have I done wrong ?
> Could you please give advise . Thank you !
>
> mun wai.
>
> ----- Original Message -----
> From: "Jose Silva" <josesilva22@xxxx>
> To: <equismetastock@xxxxxxxxxxxxxxx>
> Sent: Friday, December 02, 2005 3:18 AM
> Subject: [EquisMetaStock Group] Re: Is there a way to display date
> in explorer report ?
>
>
> Try:
>
> ==================
> Column B: dd/mm/yy
> ==================
> ---8<-------------------
> event:=PeakBars(1,C,7)=0; { <--- place any event code here }
>
> y:=ValueWhen(1,event,Year());
> y:=If(y<2000,y-1900,y-2000);
> m:=ValueWhen(1,event,Month())*100;
> d:=ValueWhen(1,event,DayOfMonth())*10000;
>
> y+m+d
>
> ---8<-------------------
>
> Replace "event" variable with any general condition to find its last
> ddmmyy date.
>
>
> jose '-)
> http://www.metastocktools.com
Yahoo! Groups Links
------------------------ Yahoo! Groups Sponsor --------------------~-->
Try Online Currency Trading with GFT. Free 50K Demo. Trade
24 Hours. Commission-Free.
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/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/
|