PureBytes Links
Trading Reference Links
|
Hello,
is it possible to add default values to functions.
I want to define any function as shown below. However if i add nothing into
the brackets, the default value for periods should be used.
IS this possible ?
function KAMA(P,Periods)
{
Direction = P - Ref(P,-periods);
Volatility = Sum(abs(P-Ref(P,-1)),periods);
Volatility =IIf(Volatility>0,Volatility,0.00001);
ER = abs(Direction/Volatility);
FastSC = 2/(2 + 1);//FastSC = 2/(2 + 1);//Standard
SlowSC = 2/(30 + 1);//SlowSC = 2/(30 + 1);
SSC = ER * (FastSC - SlowSC) + SlowSC;
Constant = SSC^2;
return AMA( P, Constant );
}
Regards
Klaus
------------------------ Yahoo! Groups Sponsor --------------------~-->
Try Online Currency Trading with GFT. Free 50K Demo. Trade
24 Hours. Commission-Free.
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/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/
|