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

Re: [amibroker] Default value of Param



PureBytes Links

Trading Reference Links

Hello,

This is because sinc (section increment) is set to 10.
Section increment is special trick that allows to drag-drop
multiple copies of the same formula and each will have
different default depending on section number.
As your section has number 1 (this 1 at the end "EMA1")
the default value is 30 + 1 * 10 = 40.

You can prevent it if you don't use section increment:

_SECTION_BEGIN("EMA1");
P = ParamField("Price field",-1);
Periods = Param("Periods", 30, 2, 200, 1 ); // no section increment parameter here
Plot( EMA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", 
colorCycle ), ParamStyle("Style") ); 
_SECTION_END();

http://www.amibroker.com/f?param

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- 
From: "keithmccombs" <kmccombs@xxxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Friday, September 02, 2005 12:29 AM
Subject: [amibroker] Default value of Param


> When I use the code below to display a chart the value of Periods is 
> initially 40 instead of 30 which I expect.  If, however, I comment
> out 
> the _SECTION_BEGIN("EMA1"); and _SECTION_END(); statements, the
> initial 
> value is 30 as I expected.  Can someone  explain:
> 
> 1.  What is going on here?
> 2.  Is there a way to make the initial value 30?
> 
> _SECTION_BEGIN("EMA1");
> P = ParamField("Price field",-1);
> Periods = Param("Periods", 30, 2, 200, 1, 10 );
> Plot( EMA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", 
> colorCycle ), ParamStyle("Style") ); 
> _SECTION_END();
> 
> TIA.
> -- Keith
> 
> 
> 
> 
> 
> 
> 
> 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
> 
> 
> 
> 
> 
> 
>


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Help Sudanese refugees rebuild their lives through GlobalGiving.
http://us.click.yahoo.com/hjNroD/EbOLAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

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:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/