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

Re: [EquisMetaStock Group] Re: Is there a way to display date inexplorer report ?



PureBytes Links

Trading Reference Links

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@xxxxxxxxx>
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
>
>
>
>
> --- In equismetastock@xxxxxxxxxxxxxxx, "Safdar" <Safdar@xxxx> wrote:
> >
> > Thank you a lot it works fine .
> > But it works here for rsi condition only.
> > What if for other conditions like when in peak function i.e. peak(1,
> c,7)
> > That what was the date when recent peak occurred
> > There may be other conditions also .
> > can there a general formula?
> >
> >
> >
> > ----- Original Message -----
> > From: "Jose Silva" <josesilva22@xxxx>
> > To: <equismetastock@xxxxxxxxxxxxxxx>
> > Sent: Wednesday, November 30, 2005 10:13 PM
> > Subject: [EquisMetaStock Group] Re: Is there a way to display date
> > in explorer report ?
> >
> >
> > Try this for dmmyy/ddmmyy date value exploration outputs:
> >
> > ==================
> > Column B: dd/mm/yy
> > ==================
> > ---8<-------------
> >
> > event:=RSI(14)>30;
> >
> > { Perhaps more useful: }
> > event:=Cross(RSI(14),30);
> >
> > 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<-------------
> >
> >
> > Or for yymmdd/ymmdd format:
> >
> > =================
> > Column B: y/mm/dd
> > =================
> > ---8<-------------
> >
> > event:=RSI(14)>30;
> >
> > { Perhaps more useful: }
> > event:=Cross(RSI(14),30);
> >
> > y:=ValueWhen(1,event,Year());
> > y:=If(y<2000,y-1900,y-2000)*10000;
> > m:=ValueWhen(1,event,Month())*100;
> > d:=ValueWhen(1,event,DayOfMonth());
> >
> > y+m+d
> >
> > ---8<-------------
> >
> > Full year date formats such as yyyymmdd produce rounding-off
> > calculation errors in MetaStock.
> >
> >
> > jose '-)
> > http://www.metastocktools.com
> >
> >
> >
> > --- In equismetastock@xxxxxxxxxxxxxxx, "Safdar" <Safdar@xxxx> wrote:
> >
> > Hello
> > Suppose I want to run an exploration
> > cola
> > barssince(rsi(14)<30)
> >
> > Now is it possible to display in colb the date of the bar where
> > rsi(14) >30?
> >
> > Thanks
>
>
>
>
>
>
>
>
> 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/