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

Re: [Metastockusers] Finding the threshold values for an indicator



PureBytes Links

Trading Reference Links

Daniele, try below

>> What I would like to do, is find the percentage of time that the
> > indicator in question has been above (or below) a certain value for a
> > specific security, eg since Jan 00 the RSI of YYY, Inc. has been
> > above 70 only 3.5% of the time.

This we can do.  You make an exploration.  In an exploration you have six
columns so you can find 6 values.  For example  try the following code in
Column A:
------------------

periods:=1000;  {Choose the number of periods you want to look at}
ind:= RSI(C,14);  {Put whatever indicator you want to use in here}
minval:=70;   {value that you want to be above}
maxval:=80;  {value that you want to be below}

barsabove:=Sum(If(Ind>minval, 1, 0), periods); {counts bars above minval}
pctabove:=barsabove/periods*100;  {gives % of periods above minval}

barsbelow:=Sum(If(Ind<maxval, 1, 0), periods); {counts bars below maxval}
pctbelow:=barsabove/periods*100;  {gives % of periods above minval}

barsbetween:=Sum(If(Ind<maxval AND Ind>minval, 1, 0), periods); {counts bars
between minval and maxval}
pctbetween:=barsbetween/periods*100;  {gives % of periods between minval and
maxval}

{now pick which of the 3 answers you want to display.  if you use the above
in an indicator on a chart you do not need the below.  You do need the
below to get a result in the exploration.  modify as required}

If(barsabove>0,barsabove,0)  {needed to get output to exploration report,
modify as desired}

-----------

In col B, C, etc you can copy the same formula.  Then change the parameters
to suit whatever you want.   That way you get 6 answers per run.  eg. col A
is above 70, B is above 80, C above 90, etc.

Then run your exploration and you will get the % of the last x periods the
indicator was above, below or whatever for each security.  Be sure that the
number of bars in the exploration is greater than the number you are looking
for by at least the number of bars it takes to get a valid answer for the
indicator.

Lots of work but you can get close to what you want.

> > > Even better, what is the value below which fall 95% (or 90% etc.)
> > of the observations of the indicator in the time frame specified.

This one is tougher.  What I'd do is plot the indicator on the chart.  Then
right click on the indicator and copy. Then paste into Excel.  Once in Excel
you can do statistics to your heart's content.  Mean's, std deviations,
correlations, graphs, you name it.

Let me know if it works

Tom


----- Original Message ----- 
From: "Roy Larsen" <rlarsen@xxxxxxxxxxxxxx>
To: <Metastockusers@xxxxxxxxxxxxxxx>
Sent: Thursday, October 02, 2003 2:38 PM
Subject: Re: [Metastockusers] Finding the threshold values for an indicator


> JO
>
> > What you are talking about doing can't be done in Metastock directly,
> > other than by observation.
>
> I'm tempted to take up the challenge but since I've already spent some
time
> looking at the same question on another forum I suspect you might be
right.
> It's fair to say though that some interesting discoveries (about
MetaStock)
> come from researching things that others have said can't be done.
>
> Thank you for your forthright and challenging comments. I really
appreciate
> your contributions.
>
> Roy
>
> > However, all the thresholds change over time. What works during this
> > five year period might well be different for the next five year
> > period.
> >
> > Other issues include the number of false signals and whipsaws you're
> > willing to tolerate, the speed of the indicator, the time frame and
> > the market trend at the time. Many pros adjust their thresholds in
> > concert with current trading conditions. That takes lots of
> > experience.
> >
> > Almost all indicators have published thresholds. Many of them can be
> > found in Technical Analysis from A to Z, so you don't have to
> > reinvent the wheel.
> >
> > Many thresholds are published in articles you can find on the web.
> > You can have three choices, trust the thersholds published, count
> > your events by hand, or spend a few thousand dollars and hours on
> > historical testing software.
> >
> > I just finished consulting on one fundamental applications package
> > that's the best I've seen. The basic model screening package is $5000
> > a year. The historical testing software for it is an additional $8000
> > a year. With it, you can back test any set of fundamental variables
> > and how they have impacted stock prices during any time period over
> > the last 50 to 75 years. Cool stuff! I was really close to buying it
> > for my own use.
> >
> > The same kind of packages exist for TA.
> >
> > No matter what question you can think of, somebody has already tested
> > it and researched it. If you can find that person, they'll tell you
> > the answer to your question and save you a lot of time. No, I don't
> > know the phone number of that person.
> >
> > JO
> >
> >
> >
> >
> >
> >
> > --- In Metastockusers@xxxxxxxxxxxxxxx, "Daniele Bevilacqua"
> > <daniele.bevilacqua@xxxx> wrote:
> > > Hi,
> > >
> > > in order to decide which threshold to use to validate an indicator,
> > so far I have been eyeballing them on charts of a lengthy period of
> > time and drawn very empirical (to say the least) conclusions. I am
> > wondering if there is a better way to do this - there must be, I
> > assume...
> > >
> > > What I would like to do, is find the percentage of time that the
> > indicator in question has been above (or below) a certain value for a
> > specific security, eg since Jan 00 the RSI of YYY, Inc. has been
> > above 70 only 3.5% of the time.
> > >
> > > Even better, what is the value below which fall 95% (or 90% etc.)
> > of the observations of the indicator in the time frame specified.
> > >
> > > Any suggestions?
> > >
> > > many thanks in advance
> > >
> > > Daniele
> >
> >
> >
> > To unsubscribe from this group, send an email to:
> > Metastockusers-unsubscribe@xxxxxxxxxxx
> >
> >
> >
> > Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
> >
> >
> >
> >
>
>
>
>
> To unsubscribe from this group, send an email to:
> Metastockusers-unsubscribe@xxxxxxxxxxx
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/zMEolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
Metastockusers-unsubscribe@xxxxxxxxxxx

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/