PureBytes Links
Trading Reference Links
|
Hi there,
Maybe use the 'Cum' function, MSs counter. Something like
Cum(X>Y)
will do the trick. This will count the whole history where X > Y.
You can also try the 'BarsSince' function which counts since something
last was true, so
BarsSince(X<=Y)
will count the bars since X>Y.
Regards
MG Ferreira
TsaTsa EOD Programmer and trading model builder
http://www.ferra4models.com
http://fun.ferra4models.com
--- In equismetastock@xxxxxxxxxxxxxxx, "Sharad Lohia"
<sharadlohia@xxxx> wrote:
> In excel - the COUNTIF() function is used to count the number of
previous days when the high was lower than the high of the current day.
>
> is there a way to program this in ms easily pls ?
>
> regards
> sharad lohia
> ----- Original Message -----
> From: MG Ferreira
> To: equismetastock@xxxxxxxxxxxxxxx
> Sent: Saturday, April 23, 2005 10:31 PM
> Subject: Re: [EquisMetaStock Group] EXPLORATION
>
>
>
>
> Maybe post some of the Excel code. I understand you count the number
> of days that a new high has been attained - or that the day's high has
> been higher than the previous one, and build the system around that.
> But the Excel code will maybe help, so give some formulas and I am
> sure somebody here may be able to help with the translation. MS is
> not that difficult, especially if you are comfortable 'programming' in
> Excel, then you should not have too many problems.
>
> Regards
> MG Ferreira
> TsaTsa EOD Programmer and trading model builder
> http://www.ferra4models.com
> http://fun.ferra4models.com
>
>
> --- In equismetastock@xxxxxxxxxxxxxxx, "Sharad Lohia"
> <sharadlohia@xxxx> wrote:
> > I am currently using a system which goes long stocks which move up
> with volumes and make new highs. I have programmed this system in
> excel and now i want to program it in metastock. The setup is that if
> a stock is making new highs - going long will give a good return over
> the next few days provided volume is confirming. The key is when to
> exit. Now in bull markets several stocks fulfil this criteria and my
> experience has shown that the more the stock is in new highs (ie. the
> more the number of previous days whose highs have been crossed), the
> greater the profits. So the best way is to sort out the list on that
> basis.
> >
> > Unfortunately - i am unable to program it in metastock.
> >
> > Using the formula given - and thanks once more for that to J - it
> gives 0 as the answer since the current day has made the new high.
> Changing 1 to 2 gives the number of days since the last swing high -
> which is lower than the current high in my case and thus of no use. I
> have tried changing the formula and breaking my head on a solution -
> but to no avail.
> >
> > What am i missing here. How can i use bars since function and value
> when function and compare previous highs with current high to mark
> that day out
> >
> > Any clues ?
> >
> > Regards
> > ----- Original Message -----
> > From: MG Ferreira
> > To: equismetastock@xxxxxxxxxxxxxxx
> > Sent: Saturday, April 23, 2005 1:12 AM
> > Subject: Re: [EquisMetaStock Group] EXPLORATION
> >
> >
> >
> >
> > > The assumption being that the more the number of previous days'
> > highs the stock has crossed today - the stronger the trend.
> >
> > If this value returns a high value, then the trend is not
strong, the
> > spike is huge! Think about it - if you have a falling market, and
> > suddenly a spike, then this will be a sudden high value. In a
rising
> > market, this value will be smallish as you have an upward
trend, and
> > the high keeps on getting higher.
> >
> > Regards
> > MG Ferreira
> > TsaTsa EOD Programmer and trading model builder
> > http://www.ferra4models.com
> > http://fun.ferra4models.com
> >
> >
> >
> > --- In equismetastock@xxxxxxxxxxxxxxx, "Sharad Lohia \(G\)"
> > <sharadlohia@xxxx> wrote:
> > > Thanks for the reply - but this is not what i was looking for.
> > >
> > > I think i was not clear enough.
> > >
> > > What i want to do is to run an exploration at the end of
each day
> > which will list all stocks and rank them on the basis of -
> > > TODAY'S HIGH IS HIGHER THAN THE HIGH OF "X" NUMBER OF
PREVIOUS DAYS
> > >
> > > This "X" should be a column in the exploration and i can
then sort
> > on that basis.
> > >
> > > Eg. If today one stock has made a 8 day high, X = 8 for that
stock.
> > >
> > > The formula below is for - Bars since the last high. But
what i want
> > is stocks crossing highs of last several days.
> > >
> > > The assumption being that the more the number of previous days'
> > highs the stock has crossed today - the stronger the trend.
> > >
> > > Could you kindly help
> > >
> > > Regards
> > > ----- Original Message -----
> > > From: Jose Silva
> > > To: equismetastock@xxxxxxxxxxxxxxx
> > > Sent: Thursday, April 21, 2005 3:32 AM
> > > Subject: Re: [EquisMetaStock Group] EXPLORATION
> > >
> > >
> > >
> > >
> > > Sharad, try this MS indicator/exploration code:
> > >
> > > ---8<-------------
> > > Hi:=ValueWhen(1,H>Ref(H,-1),H);
> > > BarsSince(H=Hi)
> > > ---8<-------------
> > >
> > >
> > > jose '-)
> > > http://www.metastocktools.com
> > >
> > >
> > >
> > > --- In equismetastock@xxxxxxxxxxxxxxx, "Sharad Lohia"
> <sharadlohia@xxx
> > > .> wrote:
> > > > I want to rank the stocks at the end of each day - on the
> basis of
> > > > the number of days high it has made. Thus the
exploration result
> > > > should give the number of days which have passed since that
> day's
> > > > high was more than today's high. I can then sort it on that
> basis
> > > >
> > > > Is it possible. Am unable to find the right function or
formula.
> > > >
> > > > Kinldy help.
> > > >
> > > > Regards
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
> > Yahoo! Groups Links
>
>
>
>
>
>
>
> Yahoo! Groups Links
------------------------ Yahoo! Groups Sponsor --------------------~-->
In low income neighborhoods, 84% do not own computers.
At Network for Good, help bridge the Digital Divide!
http://us.click.yahoo.com/EpW3eD/3MnJAA/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/
|