PureBytes Links
Trading Reference Links
|
Alain
I tried your null:=ValueWhen(1,c<0,1) idea and you are correct, nothing gets
plotted. The workaround I am using is just to make Else=0. I then have a
null function which is just 0. I then use one If T E to plot above 0, a
second If T E to plot below 0, and the null to plot a thick gray line at 0.
As long as this is the last function plotted, it covers the wrong color of
the If T E statement. The moral of the story is that you can make an If Then
Else from 2 If Then functions but you cannot make 1 If Then from an If Then
Else statement.
Thanks, neo
-----Original Message-----
From: owner-metastock@xxxxxxxxxxxxx
[mailto:owner-metastock@xxxxxxxxxxxxx]On Behalf Of Jossart Alain
Sent: Thursday, December 28, 2000 9:35 AM
To: metastock@xxxxxxxxxxxxx
Subject: Re: Need Help on If Function....
neo
We don't need a DLL to create a "NULL" function. Just write a simple
function that never produces a plot.
null:=ValueWhen(1,c<0,1);
Next, try to use it the following way in another custom indicator :
mva:=if(c>0,c,fml("NULL"));
mva;
What do you think will plotted ?
Answer : NULL ! [null literally absorbs the whole "if" function]
Conclusion : the Metastock "if/then/else" is flawed.
Make it work and no need at all for "if/then" stuff, really... Neither will
provide the elegant solution to your colour problem anyway.
Alain.
----- Original Message -----
From: "neo" <neo1@xxxxxxxxx>
To: <metastock@xxxxxxxxxxxxx>
Sent: Wednesday, December 27, 2000 2:32 PM
Subject: RE: Need Help on If Function....
> Alain
>
> This is not the problem. Never mind, the real question has already been
> answered by MetaStock.
>
> -----Original Message-----
> From: owner-metastock@xxxxxxxxxxxxx
> [mailto:owner-metastock@xxxxxxxxxxxxx]On Behalf Of Jossart Alain
> Sent: Tuesday, December 26, 2000 2:09 AM
> To: metastock@xxxxxxxxxxxxx
> Subject: Re: Need Help on If Function....
>
>
> neo,
> Just put any function Metastock will not be able to calculate due to the
> insufficient number of days back.
> Alain
>
> ----- Original Message -----
> From: "neo" <neo1@xxxxxxxxx>
> To: <metastock@xxxxxxxxxxxxx>
> Sent: Monday, December 25, 2000 4:46 PM
> Subject: RE: Need Help on If Function....
>
>
> > John
> >
> > No need for apologies. I appreciate your attempt. I still think that
> > MetaStock needs to correct this oversight in their indicators. I wrote
to
> > MetaStock about it but we will see if it is corrected in v 7.04.
> >
> > neo
> >
> >
> > -----Original Message-----
> > From: owner-metastock@xxxxxxxxxxxxx
> > [mailto:owner-metastock@xxxxxxxxxxxxx]On Behalf Of j seed
> > Sent: Monday, December 25, 2000 8:25 AM
> > To: metastock@xxxxxxxxxxxxx
> > Subject: Re: Need Help on If Function....
> >
> >
> >
> > John,
> >
> > Tried the misused ref statement in an if clause and you are correct it
did
> > not work. Sorry, neo it was worth a try.
> >
> > J.
> >
> >
> > _________________________________________________________________
> > Get your FREE download of MSN Explorer at http://explorer.msn.com
> >
> >
> >
>
>
>
|