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

Re: [amibroker] Re: how to code this



PureBytes Links

Trading Reference Links

If AMA2 is

    forward * array + feedback * PREV;

and das300 wants

    VALUE := KONSTANT + (PREV * Konstant2)
i.e.
    2 + (PREV * 3)

you can use        AMA2(Cum(1)!=1,2,3)

The "cum(1)!=1" is needed to seed AMA2 with 0 as it uses 1 by default.
If you can suffer starting with a seed of 1, then simply use
    AMA2(1,2,3).

With those coefficients the series quickly goes asymptotic anyway.

BTW, there is usually no need to use loops, as AFL is an array-processing 
language, with an implicit "for( i=0;i < BarCount; i++ )" around every 
statement.


----- Original Message ----- 
From: "Anthony Faragasso" <ajf1111@xxxxxxxx>



Constant1=2;

Constant2=3;

Value1=0;

for( i=1;i < BarCount; i++ )

{

Value1[i]=constant1[i]+(value1[i-1]*Constant2[i]);

}

Filter=1;

//AddColumn(Value,"");

AddColumn(Value1,"v1");



  ----- Original Message ----- 
  From: das300@xxxxxxxxxx

  VALUE := KONSTANT + (PREV * Konstant2)

  :-)



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.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/