There is a HELP manual with these simple kinds of answers in it. You will also find more info there that we can give since we'd have to re-write the HELP pages. I know HELP is sometimes difficult when "you don't know what you don't know", but I already told you what to use :-)

 

To get you started I copied this from HELP complete with examples, and a note from Tomasz about Parameters being independent.

 

PARAM
- add user user-definable numeric parameter

Exploration / Indicators
(AFL 2.3)

 

SYNTAX

Param( ''name'', default, min, max, step, sincr = 0 )

RETURNS

NUMBER

FUNCTION

Adds a new user-definable parameter, which will be accessible via Parameters dialog :
right click over chart pane and select "Parameters" or press Ctrl+R allows to change chart parameters - changes are reflected immediatelly.

  • "name" - defines parameter name that will be displayed in the parameters dialog
  • default - defines default value of the parameter
  • min, max - define minimum and maximum values of the parameter
  • step - defines minimum increase of the parameter via slider in the Parameters dialog
  • sincr - automatic section increment value (used by drag-drop interface to increase default values for parameters)

WARNING: default/min/max/step parameters have to be CONSTANT numbers. This is because these values are cached and are not re-read during subsequent formula evaluations.

EXAMPLE

Sample code 1:

ticker = ParamStr( "Ticker", "MSFT" );
sp = Param( "MA Period", 12, 2, 100 );
PlotForeign( ticker, "Chart of "+ticker, ParamColor( "Price Color", colorLightYellow ), styleCandle );
Plot( MA( Foreign( ticker, "C" ), sp ), "MA(" + WriteVal( sp, 1.0 ) + ")", ParamColor( "MA Color", colorRed ) );
Sample code 2:

sp = Param( "RSI Period", 12, 2, 100 );
r = RSI( sp );
Plot( r, "RSI("+WriteVal(sp,1.0)+")", ParamColor("RSI Color", colorRed ) );

Buy = Cross( r, 30 );
Sell = Cross( 70, r );

PlotShapes( shapeUpArrow * Buy + shapeDownArrow * Sell, IIf( Buy, colorGreen, colorRed ) );

SEE ALSO

PARAMCOLOR() function , PARAMSTR() function PARAMCOLOR() function , ParamTime() function , ParamDate() function

Comments:

Tomasz Janeczko
tj --at-- amibroker.com
2006-02-19 06:18:23

Note that Parameters are INDEPENDENT for each chart pane and for Automatic Analysis window.
In Automatic Analysis window parameters can be modified using "Parameters" button and they are independent from ones you use for any chart.

 

--

Terry

 

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of thorstef2003
Sent: Sunday, July 30, 2006 09:21
To: [email protected]
Subject: [amibroker] Re: Charting different indicators on different Sheets

 

Terry, I don't know how to use PARAM. Please provide an example for

whatever you are trying to say.

I have just tried copying the "Price" indicator and saving it as a

custom indicator with a different name as Prashanth advised.

Inserting the "new" indicator creates a blank pane, which I later

found was because AB uses internal code to draw the price chart.

Can someone help out with a paste of just the "Price" indicator?

 

--- In [email protected], "Terry" <[EMAIL PROTECTED]> wrote:

>

> You can use Insert Linked (or not) and simply make your values

available

> as parameters (see PARAM statements). Then just change the

parameters on

> each chart separately. They will be "remembered" until you change

them

> or delete the chart.

>

> Caution: running a backtest or an explore from a chart does NOT

transfer

> the parameter settings. You need to change them in AA->Parameters

each

> time you backtest/scan/explore. To avoid this, create multiple

copies

> each with different parameters as was suggested by Prashanth.

> --

> Terry

> -----Original Message-----

> From: [email protected] [mailto:[EMAIL PROTECTED]

On

> Behalf Of thorstef2003

> Sent: Sunday, July 30, 2006 04:04

> To: [email protected]

> Subject: [amibroker] Charting different indicators on different

Sheets

>

> Hi,

> How do I use use the same indicator with different settings on

> different sheets?

> For example, on Sheet1 I would like only price

> Sheet2 Price with Bollinger bands 10

> Sheet3 Price with 20EMA and 50EMA

> Sheet4 with Bollinger bands 20 and Keltner channels

> Sheet5 with 5EMA and 10EMA

> Sheet6 Weekly chart and daily

> And can an index price chart be superimposed on a stock price chart?

> Thanks.

> Stef

>

>

>

>

>

>

> Please note that this group is for discussion between users only.

>

> To get support from AmiBroker please send an e-mail directly to

> SUPPORT {at} amibroker.com

>

> For other support material please check also:

> http://www.amibroker.com/support.html

>

> Yahoo! Groups Links

>

 

 

 

 

 

 

 

Please note that this group is for discussion between users only.

 

To get support from AmiBroker please send an e-mail directly to

SUPPORT {at} amibroker.com

 

For other support material please check also:

http://www.amibroker.com/support.html

 

 

Yahoo! Groups Links

 

<*> To visit your group on the web, go to:

    http://groups.yahoo.com/group/amibroker/

 

<*> To unsubscribe from this group, send an email to:

    [EMAIL PROTECTED]

 

<*> Your use of Yahoo! Groups is subject to:

    http://docs.yahoo.com/info/terms/

 

 

__._,_.___

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html






SPONSORED LINKS
Investment management software Real estate investment software Investment property software
Software support Real estate investment analysis software


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to