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

Re: use IF statement, return nul value



PureBytes Links

Trading Reference Links

Thanks for your explaination.  I REALLY misunderstood and was careless in my
reading of your initial post.  I understand what you are stating and will look
again with that in mind.


Dan

jhmtn wrote:

> Dan,
>
> Yes, that is why the plot on the Close ("C") when False.  That is what the
> whole discussion has been about.  The If logical instruction packaged with
> Metastock will always generate a value to plot for both TRUE and FALSE
> values of the If logical.  This always creates a continuous line or
> continually dotted line.  A discontinuous function that would plot on only
> either the TRUE result or the FALSE result would be possible if there was a
> logical NULL value that could be used to suppress the point plot and the
> connect the dots plot function.  But Metastock won't allow it and has no
> NULL value function.
>
> So the discussion has been on again - off again for several months about a
> manner in which we could trick Metastock and come up with something that
> comes close to approximating a discontinuous function plot.  This fudge
> factor attempt was as close as I could get to that result.  Yes, the FALSE
> result does plot, but is almost imperceptible when examining the graphic
> output.
>
> When I first read your letter I thought that there was a dot above every
> bar, not some above the bar (High times factor) and some on (at the Close)
> which is what happens.  I hope I've explained what's going on here.  It is
> not a true NULL output result, but is as close as I can get given the
> limitations of the Metastock function language.
>
> Hope this helps! ............. John
>
> ----- Original Message -----
> From: "Dan" <dcash@xxxxxxxxxxxx>
> To: <metastock@xxxxxxxxxxxxx>
> Sent: Tuesday, January 30, 2001 10:08 AM
> Subject: Re: use IF statement, return nul value
>
> > John,
> >
> > I do not have much time this am, will send later.  But in mean time, I did
> cut
> > and paste.
> > And after looking at your gif, I 'suspect' possibly yours is plotting each
> bar
> > also.  Look at the first candlestick extreme left, at the bottom of the
> body and
> > the top of its bottom wick, there is a 'small' rectanglular structure.
> Try
> > changing your color to a high contrast color such as white and see what
> you get.
> >
> >
> >
> > Dan
> >
> > jhmtn wrote:
> >
> > > Dan,
> > >
> > > ??? If you just did a cut and paste of the indicator, I don't know.
> > > I've attached a gif showing the results I obtained.  Notice that the
> > > "Dot" just shows over the bars that are Inside Day bars (errr....
> > > candlesticks I should say).
> > >
> > > Send me your chart and a copy of the indicator you applied and
> > > maybe I can tell.  Is it possible that the chart you've used to test
> > > has an abnormally high number of Inside Days?
> > >
> > > Bewildered at your results without more info.
> > > John
> > >
> > > ----- Original Message -----
> > > From: "Dan" <dcash@xxxxxxxxxxxx>
> > > To: <metastock@xxxxxxxxxxxxx>
> > > Sent: Monday, January 29, 2001 7:41 PM
> > > Subject: Re: use IF statement, return nul value
> > >
> > > > I get the indicator putting a dot over every bar.  What am I doing
> wrong?
> > > >
> > > >
> > > > jhmtn wrote:
> > > >
> > > > > Michael,
> > > > >
> > > > > Yes! This is how I implemented the useage.  With graphic bars,
> > > > > it makes the close more noticeable to the eye, with graphic
> > > > > candlesticks, it often dissappears.
> > > > >
> > > > > There are manual changes needed however:
> > > > > 1. The line style has to be changed to being a dotted line.
> > > > > 2. The line weight has to changed to being thicker than the
> > > > >     default.
> > > > > 3. The line color has to be changed to match the color of the
> > > > >     price bar.
> > > > >
> > > > > To test how this works, try the following indicator that puts
> > > > > a dot above an Inside Day Bar:
> > > > >
> > > > >         If((Inside()=1),H*1.015,C)
> > > > >
> > > > > Hope this helps ............ John
> > > > >
> > > > > ----- Original Message -----
> > > > > From: "michael" <mslist@xxxxxxxxxxxxxxxx>
> > > > > To: <metastock@xxxxxxxxxxxxx>
> > > > > Sent: Monday, January 29, 2001 8:51 AM
> > > > > Subject: RE: use IF statement, return nul value
> > > > >
> > > > > > If your formula permits, you can use the closing price as the null
> > > value.
> > > > > > This doesn't throw off the scaling like a zero value does.
> > > > > >
> > > > > > example: if( expr, true, close);
> > > > > >
> > > > > > Hope this helps.
> > > > > > Michael
> > > > > >
> > > > > > -----Original Message-----
> > > > > > From: owner-metastock@xxxxxxxxxxxxx
> > > > > > [mailto:owner-metastock@xxxxxxxxxxxxx]On Behalf Of neo
> > > > > > Sent: Friday, January 26, 2001 3:20 PM
> > > > > > To: metastock@xxxxxxxxxxxxx
> > > > > > Subject: RE: use IF statement, return nul value
> > > > > >
> > > > > >
> > > > > > Bob
> > > > > >
> > > > > > I tried everything on this a little while ago and called MS
> support.
> > > It is
> > > > > > not possible. What I has to do what make up a null indicator that
> is
> > > 0. I
> > > > > > then plot this as the last indicator with a gray line and this
> covers
> > > up
> > > > > the
> > > > > > 0 points.
> > > > > >
> > > > > > neo
> > > > > >
> > > > > >
> > > > > > -----Original Message-----
> > > > > > From: owner-metastock@xxxxxxxxxxxxx
> > > > > > [mailto:owner-metastock@xxxxxxxxxxxxx]On Behalf Of Bob Webb
> > > > > > Sent: Thursday, January 25, 2001 9:29 AM
> > > > > > To: metastock@xxxxxxxxxxxxx
> > > > > > Subject: use IF statement, return nul value
> > > > > >
> > > > > >
> > > > > > I want to use an IF Statement in an indicator.
> > > > > >
> > > > > > But I want the "else" part of the statement to return nothing... a
> nul
> > > > > > value, and not a 0 (zero) nor anything else.
> > > > > >
> > > > > > Reason: What I want to plot is a point over the bar when a
> condition
> > > is
> > > > > > met, and to plot nothing when the condition is not met. If you put
> a 0
> > > > > > (zero) as the "else" part of the statement, then the indicator
> plots a
> > > > > zero
> > > > > > at the bottom of the graph; I don't want this.
> > > > > >
> > > > > > Can you help?
> > > > > >
> > > > > > Bob.
> > > > > >
> > > > > >
> > > > > > ==============+==============
> > > > > > Robert L. Webb
> > > > > > Webb.Bob@xxxxxxxx
> > > > > > ===============+=============
> > > > > >
> > > > > >
> > > > > >
> > > >
> > > > --
> > > >
> > > > mailto:dcash@xxxxxxxxxxxx
> > > >
> > > > Kibosh spam: http://spamcop.net/
> > > >
> > > > Dan
> > > >
> > > >
> > >
> >
>   ------------------------------------------------------------------------
> > >                                    Name: Inside Day Dot Indicator.gif
> > >    Inside Day Dot Indicator.gif    Type: GIF Image (image/gif)
> > >                                Encoding: base64
> >
> > --
> >
> > mailto:dcash@xxxxxxxxxxxx
> >
> > Kibosh spam: http://spamcop.net/
> >
> > Dan
> >
> >

--

mailto:dcash@xxxxxxxxxxxx

Kibosh spam: http://spamcop.net/

Dan