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

Re: [amibroker] Re: how to code this



PureBytes Links

Trading Reference Links

Paul,

You know I tried to get it with AMA2() first....

I tried:
value=ama2(cum(1),2,3);

but the returned values did not look correct as what were presented in the email.....I did not think of cum(1) != 1.....

value=AMA2(cum(1) != 1,2,3); // works

Thank you
Anthony
  ----- Original Message ----- 
  From: Paul Chivers 
  To: amibroker@xxxxxxxxxxxxxxx 
  Sent: Wednesday, November 10, 2004 12:11 AM
  Subject: Re: [amibroker] Re: how to code this


  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)

    :-)



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

  Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 


        Yahoo! Groups Sponsor 
              ADVERTISEMENT
             
       
       


------------------------------------------------------------------------------
  Yahoo! Groups Links

    a.. To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/
      
    b.. To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx
      
    c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 



[Non-text portions of this message have been removed]



------------------------ 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/