Thanks Graham for your quick reply. Your solution of using if ... 
else if, is what I had used. I was hoping that there would be way of 
passing the params from the list to the plot statement. The 
indicators are all arrays.

--- In [email protected], Graham <[EMAIL PROTECTED]> wrote:
>
> The list just returns text, you need to add definition of what the
> text represents
> Assuming the list is the same as indicator variables
> 
> Indicator = ParamList("Indicators",
> "Close|OverSoldIndicator|OverBoughtIndicator" );
> 
> if( Indicator == "OverSoldIndicator" ) PlotIndicator = 
OverSoldIndicator;
> else if( Indicator == "OverBoughtIndicator" ) PlotIndicator =
> OverBoughtIndicator;
> else PlotIndicator = Close;
> 
> Plot( PlotIndicator, _DEFAULT_NAME(), ParamColor( "Color",colorCycle
> ), ParamStyle("Style", styleLine) );
> 
> I am using IF without a loop here because the variable being checked
> is not an array
> Otherwise you could write it using IIF, but if the list is long then
> counting brackets can be tiresome
> 
> PlotIndicator = iif( Indicator == "OverSoldIndicator", 
OverSoldIndicator,
>                       iif( Indicator == "OverBoughtIndicator",
> OverBoughtIndicator,
>                       Close));
> 
> -- 
> Cheers
> Graham Kav
> AFL Writing Service
> http://www.aflwriting.com
> 
> 
> 2008/7/2 tipequity <[EMAIL PROTECTED]>:
> > Do you see the following code produces error? It point to 
ParamStyle
> > and says Argument#1 has incorrect type. TIA
> >
> > PlotIndicator = ParamList
> > ("Indicators", "Close|OverSoldIndicator|OverBoughtIndicator" );
> >
> > Plot( PlotIndicator, _DEFAULT_NAME(), ParamColor( "Color",
> > colorCycle ), ParamStyle("Style", styleLine) );
> >
> >
> >
>


Reply via email to