Goldwing,
I have version 4.70.5. I get no errors running this code. Here's the
output from Explore:
--
Terry
-----Original Message-----
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of
goldwing01_1999
Sent: Monday, November 28, 2005 04:40
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Help with old code from DT
function IIR2( input, f0, f1, f2 )
{
result[ 0 ] = input[ 0 ];
result[ 1 ] = input[ 1 ];//<---- getting error
for( i = 2; i < BarCount; i++ )
{
result[ i ] = f0 * input[ i ] +
f1 * result[ i - 1 ] +
f2 * result[ i - 2 ];
}
return result;
}
C1=Foreign("^VIX","C");C1=C;
RED=IIR2( C1, 0.2, 1.4, -0.6 );
k=0.6;// Optimize("k",0.6,0.1,2,0.1);
LINE=IIR2(C1,0.2-0.01*K,1.4+0.01*K,-0.6);
Buy=Cross(LINE,RED);
Sell=Cross(RED,LINE);
E1=Equity(1,0);dd=40;MA1=MA(E1,dd);
tb=100*Cum(E1<MA(E1,dd))/Cum(1);
Filter=1;
AddColumn(E1,"E1");
AddColumn(tb,"tb %");
------------------------ 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/