Sometimes in loop code you need to initialize the entire array first, but I didn’t mention this since it was working for me. Also, you didn't say what the error message was.
function IIR2( input, f0, f1, f2 )
result[ 0 ] = input[ 0 ];
result[ 1 ] = input[ 1 ];//<---- getting error
-----Original Message-----
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of goldwing01_1999
Sent: Monday, November 28, 2005 09:10
To:
amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Re: Help with old code from DT
now i am lost for thoughts what could be the problem, i will down
--- In amibroker@xxxxxxxxxxxxxxx, "Terry" <MagicTH@xxxx> wrote:
> Still works. I thought maybe it wouldn't since you're only looking
> bar and your function refers to more than one bar, but it runs.
> -----Original
Message-----
> From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx]
> Sent: Monday, November 28, 2005 08:00
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: RE: [amibroker] Help with old code from DT
> terry I just notice that you are set up for "current symbol and
> I'm thinking or hoping you can run the script setup with "all
> and N last quotations=1
> thanks in advance for the reply
> Terry <MagicTH@xxxx> wrote:
> I have version 4.70.5. I get no errors running this code. Here's
> -----Original Message-----
> From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx]
> 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 ] +
> 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);
> E1=Equity(1,0);dd=40;MA1=MA(E1,dd);
>
tb=100*Cum(E1<MA(E1,dd))/Cum(1);
> 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
> http://groups.yahoo.com/group/amibroker/
> amibroker-unsubscribe@xxxxxxxxxxxxxxx
> http://docs.yahoo.com/info/terms/
<http://pa.yahoo.com/*http:/us.rd.yahoo.com/evt=36035/*http:/music.ya
> .com/unlimited/> Music Unlimited - Access over 1 million songs.
> 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
> <http://groups.yahoo.com/gads?
t=ms&k=Investment+management+software&w1=I
nvestment+management+software&w2=Real+estate+investment+software&w3=I
stment+property+software&w4=Software+support&w5=Real+estate+investmen
nalysis+software&w6=Investment+software&c=6&s=200&.sig=_XXUzbE9l5lGlZ
> u4KNQ> management software
> <http://groups.yahoo.com/gads?
t=ms&k=Real+estate+investment+software&w1=
Investment+management+software&w2=Real+estate+investment+software&w3=
estment+property+software&w4=Software+support&w5=Real+estate+investme
analysis+software&w6=Investment+software&c=6&s=200&.sig=5_sgDczz3ArKG
> 9tFSJA> estate investment software
> <http://groups.yahoo.com/gads?
t=ms&k=Investment+property+software&w1=Inv
estment+management+software&w2=Real+estate+investment+software&w3=Inv
ment+property+software&w4=Software+support&w5=Real+estate+investment+
lysis+software&w6=Investment+software&c=6&s=200&.sig=_N6zcwefgp4eg5n6
> <http://groups.yahoo.com/gads?
t=ms&k=Software+support&w1=Investment+mana
gement+software&w2=Real+estate+investment+software&w3=Investment+prop
y+software&w4=Software+support&w5=Real+estate+investment+analysis+sof
> re&w6=Investment+software&c=6&s=200&.sig=MJ2jP31F3n64RDZkDadU8w>
> <http://groups.yahoo.com/gads?
t=ms&k=Real+estate+investment+analysis+sof
tware&w1=Investment+management+software&w2=Real+estate+investment+sof
re&w3=Investment+property+software&w4=Software+support&w5=Real+estate
vestment+analysis+software&w6=Investment+software&c=6&s=200&.sig=GmF8
> JASx0wrSaX5-Zlw> estate investment analysis software
> <http://groups.yahoo.com/gads?
t=ms&k=Investment+software&w1=Investment+m
anagement+software&w2=Real+estate+investment+software&w3=Investment+p
erty+software&w4=Software+support&w5=Real+estate+investment+analysis+
> tware&w6=Investment+software&c=6&s=200&.sig=aMgGsKT4w29dMAYUzQUKzg>
> * Visit your group
"amibroker
> <http://groups.yahoo.com/group/amibroker> " on the web.
> * To unsubscribe from this group, send an email to:
> amibroker-unsubscribe@xxxxxxxxxxxxxxx
> <mailto:amibroker-unsubscribe@xxxxxxxxxxxxxxx?subject=Unsubscribe>
> * Your use of
Yahoo! Groups is subject to the Yahoo!
> <http://docs.yahoo.com/info/terms/> Terms of Service.
------------------------ 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
<*> 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/