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

Re: Fw: a quick EL question (Addendum)



PureBytes Links

Trading Reference Links

> > I have an indicator called "anything" which looks like this:
> 
> Omega is way ahead of you. Check out the "Custom (x) line" series
> of indicators. 

Actually I have an indicator called "Anything" too.  I use it more 
often than the Custom indicators, for several reasons:

* It supports a variable number of display lines.  I often toss it up 
to show one thing, then decide to add one or two others.  I find it 
more convenient to do that with Anything than with the fixed Custom 
indicators.

* It defaults to displaying in a separate subgraph, vs. the Custom 
indicators which default to the price subgraph.  That's handy for 
many of the things I want to display -- oscillators and the like.  I 
could use Custom and just change it to "scale to screen" instead of 
scaling "same as price," but this saves me a step on something I use 
quite frequently.

FWIW, here is the source.  The 2nd, 3rd, and 4th plots only display 
if their value is <> -999.

Gary


Input: Val1(0), Val2(-999), Val3(-999), Val4(-999);
Vars: V1(0), V2(0), V3(0), V4(0);

V1 = Val1;        { Don't evaluate params multiple times }
V2 = Val2;
V3 = Val3;
V4 = Val4;

Plot1(V1, "Any1");
IF V2 <> -999 Then Plot2(V2, "Any2");
IF V3 <> -999 Then Plot3(V3, "Any3");
IF V4 <> -999 Then Plot4(V4, "Any4");